Closed sanhardik closed 2 years ago
Hello, Is it possible to pass query parameters on WS endpoint
For example
@sock.route('/echo') def echo(sock): print(f'User: {request.args.get('user')}') while True: data = sock.receive() sock.send(data)
wscat -c http://localhost/echo/?user=123456
When I tried, I get a 404 response
Remove the slash before the question mark. Note that your route definition does not end in slash.
Thanks, that was a dumb mistake.
Hello, Is it possible to pass query parameters on WS endpoint
For example
wscat -c http://localhost/echo/?user=123456
When I tried, I get a 404 response