-
Notifications
You must be signed in to change notification settings - Fork 54
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
Expose more in RequestContext
#127
Comments
Perhaps it's best to simply document that accessing the body is an error since the stream has already been read? |
Yeah. That makes this all a lot easier. Hrm... Is there any (good) reason to hide the request otherwise? |
I'm familiar with middleware (like the express json middleware) replacing the request body after parsing the stream so that it can be accessed. Since |
But if I understood your question correctly, I don't think we can anticipate all the reasons why someone wants access to the raw request, so I don't recommend making it completely inaccessible. However, it might not be bad to explore the idea of using a scope as @simolus3 suggested here (although for a different reason), to make the request object a bit less conspicuous (only need to be aware about it if you really want it)... |
Deprecated headers and headersAll Fixes #127
Deprecated headers and headersAll Fixes #127
We can't (er, shouldn't?) expose the entire
Request
because we read the body.But that leaves some things not accessible to custom and CloudEvent handlers
Including:
Follow-up to #108
The text was updated successfully, but these errors were encountered: