We want to be able to test the Socket IO connection on our Node (Express) backend without using the SocketsIOClient (which does work!), using cURL (or another command line tool).
I found the following:
curl --verbose -i -N -H "Upgrade: websocket" -H "Connection: Upgrade" http://<API_URL>:<PORT> However, this does not work. Even when using http://localhost:3000 and running locally, it did not work. This is the response:
* Trying ::1... * TCP_NODELAY set * Connected to localhost (::1) port 3000 (#0) > GET / HTTP/1.1 > Host: localhost:3000 > User-Agent: curl/7.64.1 > Accept: */* > Upgrade: websocket > Connection: Upgrade > * Empty reply from server * Connection #0 to host localhost left intact curl: (52) Empty reply from server * Closing connection 0