diff --git a/src/client/response.rs b/src/client/response.rs index 396645ac87..66181f1d42 100644 --- a/src/client/response.rs +++ b/src/client/response.rs @@ -26,7 +26,6 @@ pub struct Response { } impl Response { - /// Creates a new response from a server. pub fn new(url: Url, stream: Box) -> ::Result { trace!("Response::new"); @@ -62,6 +61,12 @@ impl Response { pub fn status_raw(&self) -> &RawStatus { &self.status_raw } + + /// Gets a borrowed reference to the underlying `HttpMessage`. + #[inline] + pub fn get_ref(&self) -> &HttpMessage { + &*self.message + } } /// Read the response body.