Skip to main content

Websocket

Why is response validation not needed?

For WebSocket requests, under normal circumstances, the HTTP status code must be 101 when establishing a connection, indicating the protocol has been upgraded. So validating the status code is not very meaningful.

There is no Auth tab, How can I authenticate the WebSocket API?

Currently two methods are recommended for WebSocket API authentication:

  1. When establishing the connection, pass the authentication information in a Param, Header, or Cookie field;

  2. When sending a message, pass the authentication information in a field of the message.

Does it support pre-request/test scripts and assertions?

Not yet supported, but in design and development.

Does it support request and response examples?

Not yet supported, will be evaluated for future iterations.

Why doesn't WS API support Mock?

The current Mock library does not support WebSocket API definitions, so it cannot generate message bodies based on the definition.