Postguy
Guide

WebSocket

Connect to ws:// and wss:// endpoints, send text messages and read the event log. The full composer is available through tools.

Postguy connects to WebSocket servers. It sends text and binary frames, answers pings and records every event in a log.

WebSocket support is basic. The parity file marks e.connect, e.composer, e.timeline, e.binary and e.settings as partial, and e.saved-messages as planned. The app's panel is minimal. The richer features (binary frames, ping, reading the log by sequence number) are reachable through the automation tools. Scripts and the collection runner skip WebSocket requests.

Create a WebSocket request

  1. Select a collection or folder in the sidebar.
  2. Open the plus menu and choose New WebSocket request.

The protocol is fixed when a request is created.

The request tab

ControlNotes
URL fieldPlaceholder wss://example.com/socket.
Connect / DisconnectOne button, depending on whether the socket is open. A status line reads Connected or Not connected.
SaveAppears when the request has unsaved changes.
Event logOne row per event: direction, kind, sequence number and text. The panel draws at most 2,000 rows.
Message box and SendA multi-line text field labelled Message. Send is enabled while connected and sends a text frame.

The tab connects the current draft, so you do not have to save first. Variables are resolved when you connect.

The tab edits only the URL. A request also stores the fields below. The UI does not edit them, but the engine uses them at connect time. Set them with the request_update tool, or by importing a request that carries them.

FieldBehaviour
paramsEnabled rows are appended to the URL as an encoded query string.
headersEnabled rows are sent as handshake headers. Values resolve variables.
protocolsSent as Sec-WebSocket-Protocol. The protocol the server picked is shown in the open event.
savedMessagesNamed messages with a format (see below). Stored only; there is no UI for them yet.

Message formats

A stored message has a format: Text, JSON, XML, HTML or Binary (payload stored as base64 or hex).

The panel always sends text. To send binary frames, use the ws_send tool (binary_base64).

The event log

Each event has a sequence number, a timestamp, a direction and a kind.

DirectionMeaning
sentframes you sent
receivedframes from the server
networkconnection events

Kinds are text, binary, ping, pong, open, close and error. Binary, ping and pong payloads are kept as base64, up to 1 MiB each.

Log limits for one session:

  • It keeps the newest 10,000 events.
  • It keeps at most 64 MiB of payload in total.

Session limit:

  • At most 32 sessions can be open.
  • Opening one more evicts the oldest disconnected session.
  • If none is disconnected, it fails with at most 32 WebSocket sessions can be open; close one first.

Settings

Each WebSocket request has its own settings:

SettingDefaultBehaviour
verifySslonApplies to wss://. WebSocket uses this per-request switch only. The global SSL setting is not consulted. With verification on, the system roots, the custom CA bundle and the PEM client certificate are used.
handshakeTimeoutMs00 means 30,000 ms.
maxMessageMb0Largest accepted message. 0 still enforces a hard ceiling of 64 MiB. Larger values are capped to 64 MiB.
reconnectAttempts, reconnectIntervalMs0Stored, but not acted on. Nothing reconnects automatically.

Not supported

These return an actionable error instead of silently falling back:

  • permessage-deflate compression.
  • HTTP proxies. The proxy settings do not apply to WebSocket connections.
  • Redirects during the handshake.

Also missing in the UI: search and filters in the log, hexdump view, saved-message management, and a warning for managed handshake headers.

Headless

ToolPurpose
ws_connectConnect a saved WebSocket request; returns a session id
ws_sendSend text or binary_base64 to a session
ws_messagesRead events after sequence number since (default 0); read-only
ws_disconnectClose with code (default 1000) and optional reason; the session id is dropped afterwards

Each postguy-cli call runs in a fresh process, so a session does not outlive the call. To chain steps in one process, use run --script or an agent that keeps the process alive. See Automation tools.

Copyright © 2026