Closed connyay closed 7 years ago
I was trying to come up with any use-case that would utilize this feature, but I couldn't figure out any.
Is there any specific situation where having this field helps?
Our use-case here is the desire to access the query parameters in the requests the Messenger bot is making to our API.
I've updated and rebased this code to the current master. Now that context
is used fairly extensively with *http.Request
I think there's even more reason to give clients access to the HTTP request that created the Event. Separately, it's also very difficult to do certain types of logging or extract useful fields from within our HTTP handlers without having access to the request.
Please reconsider accepting this PR.
@cee-dub Thank you for your contribution. I have merged the PR, albeit I can't seem to find a use-case where accessing request would be of any use. I don't know what's under 'useful fields' and I think that these fields should be exposed directly by the SDK, but after all it doesn't hurt performance so I've decided to merge this PR, if you've made it then i presume there's a valid case for that ;) Thanks. 👍
Cheers!
Allows access of raw incoming request in hooks