// websocket

WebSocket

Resonance keeps a real WebSocket connection open in the background so you can send and receive messages interactively, with a full transcript of the exchange.

What It Does

  • Connects to ws:// and wss:// endpoints
  • Keeps one reusable connection open per request tab
  • Sends custom handshake headers (auth tokens, subprotocols, and more)
  • Resolves {{variables}} in the URL, headers, and message
  • Shows a transcript of everything sent and received, with timestamps
  • Saves WebSocket requests alongside HTTP and gRPC requests

Connecting

  1. Create a request with a ws:// or wss:// URL — Resonance switches to WebSocket mode
  2. Add any handshake headers the server requires
  3. Click Send — Resonance connects and, if the message body isn’t empty, sends it
  4. The connection stays open until you disconnect or close the tab

Sending & Receiving

  • Type a message in the body editor and click Send — it appears in the transcript, with variables already filled in
  • Incoming messages append to the transcript as they arrive
  • The connection is reusable, so send as many messages as you need

Closing the Connection

While the socket is open, the button next to Send reads Disconnect. Click it, press Esc, or close the tab. Connection state is tracked per tab, so other tabs are unaffected.

Troubleshooting

Connection refused

  • Check the scheme — ws:// for plaintext, wss:// for TLS
  • Confirm the server is reachable and listening on that port

Handshake rejected (401 / 403)

  • Add the required handshake headers or auth token
  • For wss:// with a private CA, configure custom CA trust in the certificate settings

Next Steps

  • Server-Sent Events — one-way server streaming over plain HTTP
  • MQTT — publish/subscribe messaging over a persistent connection