Created
January 12, 2018 16:44
-
-
Save ramene/57ad605d7cbf73d373afbf0579bc2c8c to your computer and use it in GitHub Desktop.
curl websocket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --include \ | |
--no-buffer \ | |
--header "Connection: Upgrade" \ | |
--header "Upgrade: websocket" \ | |
--header "Host: example.com:80" \ | |
--header "Origin: http://example.com:80" \ | |
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
--header "Sec-WebSocket-Version: 13" \ | |
http://example.com:80/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The purpose of the key, the one supplied here should work.
The pourpose of that header is to prevent caching of websocket requests.
See https://en.wikipedia.org/wiki/WebSocket#Protocol_handshake