diff --git a/crates/core/src/http/response.rs b/crates/core/src/http/response.rs index 82a313497..798cad08b 100644 --- a/crates/core/src/http/response.rs +++ b/crates/core/src/http/response.rs @@ -177,8 +177,8 @@ impl Response { } /// Sets body. #[inline] - pub fn body(&mut self, body: ResBody) -> &mut Self { - self.body = body; + pub fn body(&mut self, body: impl Into) -> &mut Self { + self.body = body.into(); self }