macro_rules! url_query {
( $( $key:tt = $value:expr ),+ $(,)? ) => { ... };
}Expand description
Allow to construct a Vec of pairs to later feed them to the request:
let query = url_query!(foo="VALUE", bar=1, baz=0.05);
let encoded: String = query.iter().map(|(k, v)| {
format!("{}={}&", k.to_string(), v.to_string())
}).collect();
assert_eq!(encoded, "foo=VALUE&bar=1&baz=0.05&");