aio-libs / aio-libs/sockjs

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

Offen
#37 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
117
Forks
39
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

[SockJS (the client side) allows adding query strings to the endpoint URL.](https://github.com/sockjs/sockjs-client/issues/72)
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! :eyes:

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.