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
[webactors] Provide mean to access underlying servlet request (or other implementation) #76
Comments
Hmm, this may require some thought. We can't have any types exposed via the API that require a specific dependency which may not exist, and the underlying engine may be different anyway. I'm open to suggestions for an API that returns an |
Yep, or at least let a user of the library cast the No need for a generic API I think, because if at one point there will be a cast, it may be better to simply cast the |
To be totally clear about what I mean, the idea would simply to make the class |
I'm not opposed, but it would require some refactoring. For one, the class is currently named |
right, I didn't see it has been renamed apparently since 0.7.0 :) So, would you like me to propose a PR that does that (and rename |
Yeah, it's a bad name, and yes a PR would be nice. Let's make it |
- Fixes puniverse#76 - Rename HttpRequestWrapper to {Netty,Undertow,Servlet}HttpRequest - Make them public class - Give access to each specific implementation underlying mechanisms through getters
I submitted #78! I also changed the name for the other implementations and made some choices as to what is visible publicly for each. |
Hi,
When receiving an
HttpRequest
with aWebActor
, it is not possible to access the underlyingHttpServletRequest
(or at least I didn't find a way to do so :) if we are sure the actor is running on a servlet.My personal need is to be able to access the current
HttpSession
(because it contains authentication information). Well, I actually need theHttpServletRequest
itself because I'm using a library that needs it to access the session as well as the request parameters.I was expecting to be able to simply cast it to
ServletHttpRequest
and access the request parameter but the class is not visible and the parameter not accessible.Would it be possible to change that situation? I guess this must be well thought since you may not want to expose too much of the internal APIs, but if you have a clear idea of how to do that, I can provide a PR :)
Thanks!
The text was updated successfully, but these errors were encountered: