Quick questions about using Hyper with HTTP/2 #3442
-
Hello community, I also notice that Hyper doesn't expose any APIs to operate on HTTP/2 pseudo headers nor on frames like sending RST_STREAM, while the h2 crate gives more control over these things. Does it mean that I need to use h2 instead of SendRequest/Builder APIs if I have such needs? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Not quite. In HTTP/2, sending any request will always result in a new stream. The reason the
Most of them are translated to
If you need to deal with those frames directly, yes you'll need to look at the |
Beta Was this translation helpful? Give feedback.
Not quite. In HTTP/2, sending any request will always result in a new stream. The reason the
http1::SendRequest
isn'tClone
is because an HTTP/1 connection cannot send new requests until the previous one has finished. Whereashttp2::SendRequest
can be cloned to send multiple requests at the same time. (TheClone
call doesn't create a new stream. It's thesend_request()
call.)Most of them are translated to
http
types, either pieces of theUri
, or theStatusCode
.