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

Websocket docs miss an example of using wss:// #9936

Closed
Tempuser778 opened this issue Nov 17, 2022 · 7 comments
Closed

Websocket docs miss an example of using wss:// #9936

Tempuser778 opened this issue Nov 17, 2022 · 7 comments

Comments

@Tempuser778
Copy link

Hi.

The long-awaited Websocket finally landed in curl trunk on 26 October 2022. But the docs are missing an example of how to make a request to a wss address and get a respond via bash or Windows command line with curl-7.86.0.exe.

Windows requires specific syntax with escaping quotes.
Thank you again for websocket.

@bagder
Copy link
Member

bagder commented Nov 17, 2022

WebSocket support is still early and we have not even made any particular changes for the curl command line tool for it. Feel most welcome to help us improve in this area.

What "specific syntax with escaping quotes" are you referring to? I don't see why using wss:// URLs would need that more than other command lines?

@bagder bagder changed the title New 7.86.0 curl release with long-awaited Websocket support missing an example of using wss:// Websocket docs miss an example of using wss:// Nov 17, 2022
@Tempuser778
Copy link
Author

Tempuser778 commented Nov 17, 2022

Feel most welcome to help us improve in this area.

Since websocket is an interactive protocol, I think curl must treat responses like we use telnet.exe to read emails from POP3. You send a email server address, it asks you for login. You send your login, it asks for the password. Then it sends you a list of options like reading/removing emails and etc.
Finally, you may write a script depending on server answers to send a specific data.

What "specific syntax with escaping quotes" are you referring to?

I mean this this case: https://stackoverflow.com/questions/32122586/curl-escape-single-quote

@bagder
Copy link
Member

bagder commented Nov 17, 2022

I mean this this case

Sending double and single quotes in command lines can certainly be challenging to quote correctly (especially as *nix shells and Windows will do them differently), but I fail to see how that is particularly related to websocket.

@Tempuser778
Copy link
Author

Tempuser778 commented Nov 17, 2022

I don't mean that is specific to websocket, I mean what you just said in your last comment should be mentioned in the docs. Can I donate crypto to you?

@bagder
Copy link
Member

bagder commented Nov 17, 2022

I actually don't think shell-quoting should be mentioned much in the curl docs. That is a shell problem and should be detailed in shell documentation. But sure, a small example somewhere could be worthwhile.

Can I donate crypto to you?

No. (I refuse to get involved with anything "crypto".)

@Tempuser778
Copy link
Author

Since websocket is an interactive protocol, I think curl must treat responses like we use telnet.exe to read emails from POP3. You send a email server address, it asks you for login. You send your login, it asks for the password. Then it sends you a list of options like reading/removing emails and etc.

Daniel, to complete this post.
We have events in websockets. This means that server response may happen unrelated to the previous client request. Most likely, curl has to provide enumeration for all incoming messages in commandline. So a user in his response must have an option to specify the number of a previous server message to inform the server which message he responds to.
That's all.

@bagder
Copy link
Member

bagder commented Nov 17, 2022

Which websockets docs did you read when you missed the wss:// mention?

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

Successfully merging a pull request may close this issue.

2 participants