Skip to content

Consider implementing HttpBody for Request and Response #2067

@seanmonstar

Description

@seanmonstar

In hyperium/http#107, we didn't implement Stream for http::{Request, Response} so as to not have the external dependency. However, in http-body, since we define the trait and import http, we could provide this implementation.

It'd make these slightly nicer:

while let Some(data) = req.data().await {}

let buf = hyper::body::aggregate(req);

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-bodyArea: body streaming.C-featureCategory: feature. This is adding a new feature.E-easyEffort: easy. A task that would be a great starting point for a new contributor.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions