Skip to main content

raw_query_pairs

Function raw_query_pairs 

Source
pub fn raw_query_pairs(query: &str) -> Result<Vec<(String, &str)>, CamelError>
Expand description

Iterate the raw pairs of a query string, decoding only the keys.

Returns one (decoded_key, raw_pair) element per pair: the key is percent-decoded (so connect%54imeout decodes to connectTimeout), while raw_pair is the original authored key=value slice — values are never decoded here. This is the wire-fidelity view consumed by the camel-http raw filter, which forwards authored query bytes while still matching structured keys.

A malformed percent-escape in a key is an InvalidUri error naming the key; malformed escapes inside values stay raw within their span. Pairs must already be duplicate-free (enforced by parse_uri’s structured view); this function does not re-check duplicates.