We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Here's how to test a websocket connection 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/
Just replace example.com
with the hostname of your choice and you'll see all the websocket data passing by…
Credits to this Gist on GitHub for the original snippet.
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.