-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Adding extra data to request #118
Conversation
Pull Request Test Coverage Report for Build 330423480
💛 - Coveralls |
Just I have a doubt about where to initialize it empty in order to avoid memory usage and if is needed an example in a build in middleware or new one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the map will be nil everywhere, you have to initialize it empty in router.go#requestHandler()
and testsuite.go#CreateTestRequest()
.
A quick example in the documentation would be nice too.
I added one example about creating a new middleware and adding the extra information to the request, and I think I initialize empty in router.go#requestHandler() and testsuite.go#CreateTestRequest() the Extra property. mm do we need to update the branch? or something that am I missing? |
Thank you very much! |
Description
Make a clear and detailed description of your changes, with the added benefits.
Adding an extra data to Request that would allow middleware to process data that is not part of the request's body
Example a new middleware that could wrap extra information to teh Request and later be processed.
Possible drawbacks
None
Related issue(s)
List all related issues here:
Additional information