http-body icon indicating copy to clipboard operation
http-body copied to clipboard

Asynchronous HTTP body trait

Results 15 http-body issues
Sort by recently updated
recently updated
newest added

As described in https://github.com/hyperium/hyper/issues/3121, this allows server implementations to abort body writes even if the client is not reading data.

If you want to inspect the body of a `Collected` then there is currently no way to also keep the trailers around without cloning them. This PR adds a method...

Applies some small refactoring.

I'm looking into adding benchmarks to this library, inspired by https://github.com/hyperium/hyper/blob/master/benches/body.rs The goal is to make it easier to check whether a change has a positive impact or not. Before...

This would allow extracting body to `BytesMut`. This should have exactly the same performance as collecting to `Bytes`, if there is more than one buf in the `BufList`, but it...

I use `http-body` to parse the body of an endless `Transfer-Encoding: Chunked` stream. ```rust let frame = response.frame().await.expect("Stream ended").expect("Failed to read frame"); let Ok(data) = frame.into_data() else { // frame...

Adds a new body type that's backed by a `tokio::sync::mpsc` channel. Inspired by hyper's old `Body::channel`.

It is not uncommon to have a function that creatures a boxed body via `Full` or `Empty`: ```rust fn box_body_from_bytes(bytes: Bytes) -> UnsyncBoxBody { Full::new(bytes) .map_err(|e| match e {}) .boxed_unsync()...