mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 17:07:01 +02:00
add ServiceResponse::into_parts (#2499)
This commit is contained in:
committed by
GitHub
parent
774ac7fec4
commit
f9348d7129
@@ -410,6 +410,12 @@ impl<B> ServiceResponse<B> {
|
||||
self.response.headers_mut()
|
||||
}
|
||||
|
||||
/// Destructures `ServiceResponse` into request and response components.
|
||||
#[inline]
|
||||
pub fn into_parts(self) -> (HttpRequest, HttpResponse<B>) {
|
||||
(self.request, self.response)
|
||||
}
|
||||
|
||||
/// Extract response body
|
||||
#[inline]
|
||||
pub fn into_body(self) -> B {
|
||||
|
Reference in New Issue
Block a user