| let body = match resp.into_body().try_concat().await {
| ^^^^^^^^^^ method not found in `hyper::body::body::Body`
|
= note: the method `try_concat` exists but the following trait bounds were not satisfied:
`&hyper::body::body::Body : futures_util::try_stream::TryStreamExt`
`&mut hyper::body::body::Body : futures_util::try_stream::TryStreamExt`
`hyper::body::body::Body : futures_util::try_stream::TryStreamExt`
Looks like adding "unstable-stream" feature helps. Closing this.
It seems like this stopped working again since the bytes 0.5 crate removed Extend<u8> from Bytes.
This is the best I could come up with so far, but this seems very much like a workaround:
let bytes = request.into_body()
.and_then(move |bytes| async { Ok(BytesMut::from_iter(bytes)) })
.try_concat()
.await?
.to_vec();
Does anyone have a better solution?
Most helpful comment
Looks like adding "unstable-stream" feature helps. Closing this.