Connect with headers, params and auth
A WebSocket request has the same building blocks as an HTTP request: query params, headers and an Authorization tab, so you can pass a token in the handshake the way your server expects. You can also list subprotocols to negotiate (for example graphql-transport-ws or a custom protocol name). After connecting, the connection details show the request and response headers of the handshake, which is the first place to look when an upgrade is rejected.
Compose, save and reuse messages
Write messages in the composer with formatting for JSON, then send them as text or as binary frames encoded from base64 or hex. Messages you send often (a subscribe command, a heartbeat, an auth frame) can be stored under Saved messages in the request, so you and your team can resend them with one click. Saved messages travel with the collection when you export or share it.
{
"action": "subscribe",
"channel": "orders",
"token": "{{wsToken}}"
}Variables such as {{wsToken}} resolve from the active environment before the frame is sent.
A message log you can work with
Incoming and outgoing frames appear in a timestamped log. You can:
- search the log and filter it to sent, received or connection events
- view a message as text, JSON, XML, HTML or a hexdump, with line wrapping
- copy a message, or save it
- select two messages to see the time between them, which is handy when measuring latency or heartbeat intervals
- download the shown messages as JSON for a bug report
Connection settings
The Settings tab covers handshake timeout, a ping interval, the maximum message size, automatic reconnection with attempts and interval, and server certificate verification for test servers with self-signed certificates.
Examples and history
Save a connection and its exchanged messages as an example, so the request documents what a typical session looks like. Every connection you open is recorded in history for signed-in users and reopens in the WebSocket editor.
How it works
- Open the app, create a request and change its type to WebSocket.
- Enter the server URL, for example
wss://echo.websocket.org, add headers or auth if needed and connect. - Send messages and inspect the replies.
Protocol connections need a free account. The browser cannot open arbitrary connections with custom headers, so the web app relays the session through the Swastik Codes server. That server only connects to publicly reachable hosts: private, loopback and link-local addresses are refused. A single upstream message can be up to 16 MiB. The desktop app for Windows and Linux connects directly from your machine.
Frequently asked questions
Can I set custom headers on the WebSocket handshake?
Yes. Because the connection is opened by the Swastik Codes server rather than the browser's own WebSocket API, you can set any headers and auth on the handshake.
Does it support binary messages?
Yes. Send binary frames from base64 or hex input. Received binary frames can be viewed as a hexdump in the log.
Can I test Socket.IO with the WebSocket client?
Socket.IO adds its own protocol on top of WebSocket, so use the dedicated Socket.IO client, which handles handshakes, namespaces, events and acks for v2, v3 and v4.
How long can a session stay open?
Sessions are kept alive with pings and have a server-side maximum lifetime of several hours, which is enough for interactive testing.
