Skip to main content

parse_query

Function parse_query 

Source
pub fn parse_query(query: &str) -> Vec<(String, Value)>
Expand description

Parse a=1&b=two into pairs, undoing percent-encoding.

A key with no = is present with an empty value, which is how a flag in a URL (?debug) reads, and a repeated key keeps the first: a map has one slot per name, and the alternative (a list, sometimes) would make every read of every query parameter check which it got.