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

Asynchronous HTTP body trait

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

With the latest changes, moving types to `http-body-util`, I think this will require a breaking change release for a lot of crates. I have a use-case where I require the...

Adds `Throttle` which can slow down outgoing data.

I think it is convenient if implementing Body for h2::RecvStreamBody as default, because we get `http::Request` when we use h2 to handle HTTP2 requests. ```rust impl Body for h2::RecvStream {...

Today I discovered an unfortunate interaction between axum and http-body. In axum you're able to write this: ```rust use axum::{ body::{box_body, Body, BoxBody}, handler::get, http::Response, Router, }; let app =...

In tower-http we have an adapter that makes an `AsyncRead` into a `Body` https://github.com/tower-rs/tower-http/blob/serve-file/tower-http/src/serve_file.rs#L107. Is that something you'd be interested in upstreaming to http-body? Might be useful for others. Adapters...

I just wrote this: ```rust /// Response with object safe body type pub struct BytesResponse { /// Response status and header pub parts: http::response::Parts, /// Response body pub body: Box,...

According to https://github.com/hyperium/hyper/issues/3111#issuecomment-1379585720 and https://github.com/hyperium/hyper/issues/3111#issuecomment-1901058988, it seems that the `BodyExt` trait is supposed to have a `limit()` method. I couldn't find it, so I opened this PR. I also slightly...

Backports https://github.com/hyperium/http-body/pull/94 and https://github.com/hyperium/http-body/pull/112. We had some performance issues and found out that `to_bytes()` has a quadratic complexity with respect to the number of chunks in the BufList (in our...

Empty has generic parameter for Data, so it would be nice to have a generic parameter for Error as well so that Empty::new() can be used w/ functions that set...

these types are equivalent except that `String` must be utf-8. http response bodies do not have to be utf-8, so it seems weird to limit this to only `String`.