We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The WebSocket specification states that this is a valid websocket URI: ws://myserver.com/path?param=1
ws://myserver.com/path?param=1
However I am unsure if nodejs-websocket supports access to the URI parameters.
Can anyone tell me if this is supported (and if yes, how to use it)?
Thanks
The text was updated successfully, but these errors were encountered:
The Connection is passed as parameter to the "connection" listener, so you could do:
Connection
var ws = require("nodejs-websocket"); var server = ws.createServer(function (conn) { console.log(conn.path); // /path?param=1 // ... }).listen(8001)
But as far as I looked at the source, you would have to process the string yourself, there are no utility methods in the library itself.
You could use the querystring module of node's to parse the parameters after splitting the path on ?
querystring
?
Sorry, something went wrong.
No branches or pull requests
The WebSocket specification states that this is a valid websocket URI:
ws://myserver.com/path?param=1
However I am unsure if nodejs-websocket supports access to the URI parameters.
Can anyone tell me if this is supported (and if yes, how to use it)?
Thanks
The text was updated successfully, but these errors were encountered: