diff --git a/src/async_impl/response.rs b/src/async_impl/response.rs index a947b5151..5a71fed64 100644 --- a/src/async_impl/response.rs +++ b/src/async_impl/response.rs @@ -446,6 +446,15 @@ impl> From> for Response { } } +/// A `Response` can be converted into a `http::Response`. +impl From for http::Response { + fn from(r: Response) -> http::Response { + let (parts, body) = r.res.into_parts(); + let body = Body::streaming(body); + http::Response::from_parts(parts, body) + } +} + #[cfg(test)] mod tests { use super::Response;