ureq
ureq copied to clipboard
feat: Set multi query parameters
Add a query_vec function for setting multi query parameters. To avoid repeated deserialization and serialization.
Signed-off-by: zu1k [email protected]
Hi! Thanks for this! If we are to add this, I think the API should avoid Vec, and be:
pub fn query_pairs(mut self, pairs: &[(&str, &str)]) -> Self {
or it could go all the way generic, but we generally have avoided "complicated" trait bounds in other contexts.
pub fn query_pairs(mut self, pairs: impl IntoIter<(&str, &str)>) -> Self {
@jsha how do you feel about this API addition?
I think this looks good. Unless @jsha objects, we can merge it.
Late to the party, but his looks great to me!