From 3140e06ad23dc6709e13993aa712ce578a4d6280 Mon Sep 17 00:00:00 2001 From: hchockarprasad Date: Wed, 10 May 2023 18:14:42 +0530 Subject: [PATCH] Fix http body encoding (#1962) --- lib/src/fnc/util/http/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/fnc/util/http/mod.rs b/lib/src/fnc/util/http/mod.rs index e586e7c7..fc6bad19 100644 --- a/lib/src/fnc/util/http/mod.rs +++ b/lib/src/fnc/util/http/mod.rs @@ -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, } }