New in 2.4: Test runs you can trust See what's new →

WebSocket

Endpoints de teste WebSocket: /ws/echo devolve cada mensagem de texto ou binária; envie "close" para ser desconectado. /ws/ticker envia uma cotação determinística a cada segundo (?count=, máximo 300). Requisições HTTP comuns recebem um 400 explicando como se conectar.

Requisição de exemplo

Open a WebSocket that echoes every message back. Referência completa e botão Send (em inglês).

cURL
curl -X GET "https://api.testingapis.com/ws/echo"
Resposta ·
WebSocket. Connect with ws://{host}/ws/echo. Every text or binary message is echoed back; send "close" to make the server close the socket.
> hello
< hello
> close
< (server closes: 1000 "Bye!")