diff --git a/src/async_impl/response.rs b/src/async_impl/response.rs index fc5a5d464..91136e613 100644 --- a/src/async_impl/response.rs +++ b/src/async_impl/response.rs @@ -421,6 +421,14 @@ impl From for Body { } } +/// A `Response` can be transformed into a classic http hyper body response. +impl From for http::Response { + fn from(r: Response) -> http::Response { + let (parts, body) = r.res.into_parts(); + http::Response::from_parts(parts, hyper::Body::wrap_stream(body)) + } +} + #[cfg(test)] mod tests { use super::Response;