diff --git a/src/http/response.rs b/src/http/response.rs index 3611c0fd7e..9a81404504 100644 --- a/src/http/response.rs +++ b/src/http/response.rs @@ -93,6 +93,10 @@ impl Response { self.set_body(body); self } + + /// Read the body. + #[inline] + pub fn body_ref(&self) -> Option<&B> { self.body.as_ref() } } impl Response {