diff --git a/src/response.rs b/src/response.rs index cc4850a3..de2f5d79 100644 --- a/src/response.rs +++ b/src/response.rs @@ -169,6 +169,14 @@ where } } +impl IntoResponse for HeaderMap { + fn into_response(self) -> Response { + let mut res = Response::new(Body::empty()); + *res.headers_mut() = self; + res + } +} + /// An HTML response. /// /// Will automatically get `Content-Type: text/html`.