You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Getting URL query parameters on connection opened? #53
Also in need of this. I'm not great with Python but I'm going to give it a shot, and see if I can manually add it.
Edit: I have finished the portion to grab the query string. It's now working as expected, I simply need to finish the code. I will update with the appropriate code within a day or two.
For sake of simplicity, I'll just post the updated code here. I haven't tested the code on a wide range of strings, right now if your query parameters contain more than alphanumeric characters, it could potentially break. I simply made this for my needs.
In order to add this feature, you will need to update two functions in the websocket_server.py source code.
Find: def _new_client(self, handler) [Line 102] and replace it with the following code
Activity
mfranchitti commentedon Dec 4, 2018
Were you able to figure this out? I have a similar need.
amattu2 commentedon Jan 20, 2019
Also in need of this. I'm not great with Python but I'm going to give it a shot, and see if I can manually add it.
Edit: I have finished the portion to grab the query string. It's now working as expected, I simply need to finish the code. I will update with the appropriate code within a day or two.
amattu2 commentedon Jan 23, 2019
For sake of simplicity, I'll just post the updated code here. I haven't tested the code on a wide range of strings, right now if your query parameters contain more than alphanumeric characters, it could potentially break. I simply made this for my needs.
In order to add this feature, you will need to update two functions in the websocket_server.py source code.
After you edit the websocket_server.py script, you can then access the query parameters via any callback that provides the client.
Eg:
adityamohta commentedon Jan 20, 2023
I have created a PR, which can be a solution for this issue.