Skip to main content

WebSocket (Developer View)

A full-duplex long-lived connection. Unlike HTTP's one-send-one-receive, WS first establishes a connection, then sends / receives frames at any time, and finally closes.

How to Use in the UI​

  1. Create a WebSocket request: the URL takes the full address (ws://…/ws/echo or wss://…/path); handshake headers go into the request headers.
  2. Tap Connect to establish the session.
  3. Type in the session and send; received frames show up in real time.
  4. Close the session when done (sessions have a quota; idle ones are reclaimed automatically).

Plain vs Encrypted​

  • ws:// is plaintext; wss:// uses TLS.
  • If you go through the environment's WS Pre-URL, that base address must be written as ws:///wss:// — https:// would be treated as HTTP (see concepts).

Verified Behavior​

Text frames round-trip with UTF-8 intact (hello-ws-世界 sent and received identically). /ws/headers echoes back the headers you sent during the handshake, which makes it easy to verify they took effect. Subprotocols, compression and heartbeats are covered in the automated test cases.

Gotchas​

  • No echo received: confirm the server actually replies; "send" on a long connection only emits — the reply arrives later as a received frame.
  • Just want to observe without sending: after connecting you can watch incoming frames (e.g. server pushes).
  • Session quota is limited and idle sessions close after ~5 minutes; close old sessions promptly when debugging in batches.

Related: connect/send UI configuration in concepts.