Add into_body to async_impl::response::Response

Closes #200
This commit is contained in:
Christopher Vittal
2017-09-20 03:21:24 -04:00
parent 30f6b8797d
commit 8aaff6c326
2 changed files with 8 additions and 4 deletions

View File

@@ -51,6 +51,11 @@ impl Response {
&mut self.headers
}
/// Consumes the response, returning the body
pub fn into_body(self) -> Decoder {
self.body
}
/// Get a reference to the response body.
#[inline]
pub fn body(&self) -> &Decoder {