mirror of https://github.com/fafhrd91/actix-web
add `Response::into_boxed_body`
This commit is contained in:
parent
19096b9b36
commit
10459915d7
|
@ -5,6 +5,7 @@
|
|||
* Add timeout for canceling HTTP/2 server side connection handshake. Default to 5 seconds. [#2483]
|
||||
* HTTP/2 handshake timeout can be configured with `ServiceConfig::client_timeout`. [#2483]
|
||||
* Rename `body::BoxBody::{from_body => new}`. [#????]
|
||||
* `Response::into_boxed_body`. [#????]
|
||||
* `body::EitherBody` enum. [#????]
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -228,7 +228,14 @@ impl<B> HttpResponse<B> {
|
|||
}
|
||||
|
||||
// TODO: into_body equivalent
|
||||
// TODO: into_boxed_body
|
||||
|
||||
pub(crate) fn into_boxed_body(self) -> HttpResponse<BoxBody>
|
||||
where
|
||||
B: MessageBody + 'static,
|
||||
B::Error: Into<Box<dyn StdError + 'static>>,
|
||||
{
|
||||
self.map_body(|_, body| BoxBody::new(body))
|
||||
}
|
||||
|
||||
/// Extract response body
|
||||
pub fn into_body(self) -> B {
|
||||
|
|
Loading…
Reference in New Issue