Skip to content
Vegha Docs

WebSocket Requests

Vegha supports WebSocket connections for testing real-time, bidirectional APIs. A WebSocket request stays open so you can exchange messages over a single long-lived connection.

Create a WebSocket request and enter the endpoint URL — typically a ws:// or wss:// address. Connect to open the connection. While the connection is open, the request tab shows its status and the live message log.

You can use {{variable}} interpolation in the URL, so endpoints can be parameterized per environment. See Variables.

With the connection open, type a message and send it. You can send as many messages as you need over the same connection. Each message you send is recorded in the message log.

The message log shows every message exchanged on the connection in order, distinguishing messages you sent from messages received from the server. Because the log is live, it updates as the server pushes new messages, which makes it suitable for observing event streams and server-initiated traffic.

DirectionMeaning
SentA message you sent to the server
ReceivedA message pushed from the server

When you are finished, close the connection from the request tab. This ends the WebSocket session. You can reconnect later to start a new session.