Skip to content

Instantly share code, notes, and snippets.

@davidstump
Forked from htp/curl-websocket.sh
Created March 17, 2020 05:06
Show Gist options
  • Save davidstump/3f7199f7aefe5ad8293e8a0072da0b9d to your computer and use it in GitHub Desktop.
Save davidstump/3f7199f7aefe5ad8293e8a0072da0b9d 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