hyperium / http

Rust HTTP types
Apache License 2.0
1.12k stars 283 forks source link

has any way to export request/response message like go? #651

Closed greenhat616 closed 7 months ago

greenhat616 commented 7 months ago

In go, we can use http.NewRequest and do something like Request struct in hyper, and can use req.Write to write the http message to a Writer Stream.

Is there any way to do like that?

seanmonstar commented 7 months ago

There is not. This is partly because the representation differs between HTTP/1, 2, and 3. And also because there's different opinions on how to do so efficiently, so it's left to other crates.

See also #378 and #339.