Skip to content

Instantly share code, notes, and snippets.

@7rin0
Forked from htp/curl-websocket.sh
Created August 30, 2017 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 7rin0/d471c554f53c3db0d78fc19705e43e76 to your computer and use it in GitHub Desktop.
Save 7rin0/d471c554f53c3db0d78fc19705e43e76 to your computer and use it in GitHub Desktop.
Test a WebSocket using curl.
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