-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Determine name for Recv
body type
#2971
Comments
Pinging because you may have opinions about the name: @hawkw @LucioFranco @davidpdrsn. |
Node.js uses IncomingMessage. Making the connection to Body clearer though would be good. Perhaps IncomingBody? |
Assuming that the user would never construct these themselves then I like |
ReqBody? |
It's the body of a Request for servers, but it's the body of Responses for the client. |
I like |
|
Another similar name/idea would be |
I think more explícit is better and because is a request and responde body, then i like HttpBody |
I like the idea of hinting that it's a stream, I know for some it's confusing that you don't get the whole headers+body on the same await. So EDIT: On second thought, |
We temporarily renamed the old
hyper::Body
struct tohyper::body::Recv
in #2966. That was to unblock #2839, since we wanted to use the name for the trait instead. But, the name should be properly considered.The purpose of this type is: an implementation of
Body
to represent bodies received from a remote. So, the client side would see this in theResponse
, and the server side would see this in theRequest
. It is not meant to be constructed by users as a "default" implementation.Some names I've seen or considered before:
Recv
RecvStream
/RecvBody
Streaming
Incoming
Remote
Wire
/FromWire
It might help to envision the type signature users will frequently see it as, such as
Request<Streaming>
(or insert any other name in there).The text was updated successfully, but these errors were encountered: