wscat -c ws://localhost:3000 -H 'Authorization: Bearer $API_TOKEN'

Category: Web App Development

wscat -c ws://localhost:3000 -H 'Authorization: Bearer $API_TOKEN'

Connect to a local WebSocket with an auth header

Opens a WebSocket to your local server while sending an Authorization header with the token, matching how your app authenticates sockets. The -H flag repeats for multiple headers. If the handshake fails, check the token and the ws path.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.