Skip to content

Instantly share code, notes, and snippets.

@wader
Last active September 13, 2022 13:04
Show Gist options
  • Save wader/adcfdbc50da012258903 to your computer and use it in GitHub Desktop.
Save wader/adcfdbc50da012258903 to your computer and use it in GitHub Desktop.
Hacky curl websocket client, pipe to jq only works if frame data does not include literal new lines
curl -v -s -N \
-H "Connection: Upgrade" \
-H "Upgrade: websocket" \
-H "Sec-WebSocket-Version: 13" \
-H "Sec-WebSocket-Key: dummy" \
http://host |
while read -r l; do echo "${l:4}" ; done | jq .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment