diff --git a/lib/src/fnc/util/http/mod.rs b/lib/src/fnc/util/http/mod.rs index 3950cfff..e15c98b2 100644 --- a/lib/src/fnc/util/http/mod.rs +++ b/lib/src/fnc/util/http/mod.rs @@ -78,7 +78,9 @@ pub async fn put(uri: Strand, body: Value, opts: impl Into) -> Result) -> Result) -> Result< req = req.header(k.as_str(), v.to_strand().as_str()); } // Submit the request body - req = req.body_json(&body)?; + if body.is_some() { + req = req.body_json(&body)?; + } // Send the request and wait let mut res = req.send().await?; // Check the response status