Skip to content
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

Access to query strings (GET params) in user-defined endpoint handlers #37

Open
achimnol opened this issue Oct 26, 2016 · 1 comment
Open

Comments

@achimnol
Copy link
Member

SockJS (the client side) allows adding query strings to the endpoint URL.
Here, currently there is no way to access them (e.g., request.GET) inside user-defined endpoint handler coroutines. I'd like to access them! 👀

In the code, sockjs seems to invoke the user-defined endpoint handler in SessionManager.acquire() and _acquire() methods, which is called by transports' process() coroutines. SockJSRoute and transport subclasses have access to the aiohttp's request object but it is not passed to the user-defined handler via acquire method chains.

Maybe it is not a good idea to pass the whole request object to user-defined handlers due to design principles such as "separation of concern", but still I think it would be nice to have access to GET parameters.

@asvetlov
Copy link
Member

Please provide a Pull Reqest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants