pub async fn collect_pinned_stream(
    pinned_stream: Pin<Box<dyn Stream<Item = Result<Bytes, StreamError>> + Send + Sync>>
) -> Result<Bytes, StreamError>
Expand description

Convenience function that transforms a PinnedStream in a bytes::Bytes struct by collecting all the chunks. It consumes the response stream.