Fix http body encoding (#1962)
This commit is contained in:
parent
f1ef3bfd21
commit
3140e06ad2
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ pub(crate) fn uri_is_valid(uri: &str) -> bool {
|
|||
fn encode_body(req: RequestBuilder, body: Value) -> RequestBuilder {
|
||||
match body {
|
||||
Value::Bytes(bytes) => req.header(CONTENT_TYPE, "application/octet-stream").body(bytes.0),
|
||||
_ if body.is_some() => req.json(&body),
|
||||
_ if body.is_some() => req.json(&body.into_json()),
|
||||
_ => req,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue