I am trying to implement a healthcheck for WebSocket server with curl.
curl --include --no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://localhost:3000
I send an HTTP request to do the handcheck, and receive an HTTP 101 as expected :
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: qGEgH3En71di5rrssAZTmtRTyFk=
My issue is that after receiving that response, curl will just hang.
Is there any way to tell curl to exit after that successful handshake?