You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't quote string values in query parameters (#747)
* Read params regardless of input presence
Currently we only check for params added via `-f/--raw-field` and
`-F/--field` when `self.input` is not empty. It is valid to pass
parameters when no body has been set, set params independently of
input.
* Don't quote string values in query parameters
We read string values into a `serde_json::Value::String` when parsing
parameters, using its `Display` format when appending `{key}={value}`
to the URI. This is incorrect as `Value::String` encloses the value with
double quotes[0].
Use the wrapped string for `Value::String` values to avoid wrapping the
string in quotes and reject `Value::Array` and `Value::Object` values as
unrepresentable.
Full URI before:
https://oxide.sys.example.com/v1/instances?project=\"will\"
Full URI after:
https://oxide.sys.example.com/v1/instances?project=will
[0] https://github.com/serde-rs/json/blob/3f1c6de4af28b1f6c5100da323f2bffaf7c2083f/README.md#L121-L127
0 commit comments