Skip to main content

parse_query

Function parse_query 

Source
pub fn parse_query(raw: Option<&str>) -> Result<Vec<(String, String)>, String>
Expand description

Parse a raw query string into ordered key/value pairs.

None and the empty string yield no pairs. A non-empty string must be valid application/x-www-form-urlencoded.

§Errors

Returns an error string when the query cannot be parsed, so the caller can reject the request rather than silently dropping every query-bound field.