WebSocket
WebSocket test endpoints (app.UseWebSockets is registered in Program.cs): /ws/echo — echoes every text/binary message; send "close" to be disconnected. /ws/ticker — pushes a deterministic stock tick every second (?count=, max 300). Plain HTTP requests get a 400 explaining how to connect.WebSocket test endpoints (app.UseWebSockets is registered in Program.cs): … — echoes every text/binary message; send "close" to be disconnected. … — pushes a deterministic stock tick every second (?count=, max 300). Plain HTTP requests get a 400 explaining how to connect.
Your account unlocks these endpoints. Try it on each endpoint's page sends your key for you; from your own code, send a key from your API keys page in the X-TestingApis-Key header.
These endpoints need a free account. Create one or sign in to see their details and try them here.
- GET
wss://api.testingapis.com/ws/echoOpen a WebSocket that echoes every message backOpen a WebSocket that echoes every message back. - GET
wss://api.testingapis.com/ws/tickerOpen a WebSocket that pushes a stock tick every secondOpen a WebSocket that pushes a stock tick every second.
Example request
Open a WebSocket that echoes every message back. Full reference and a Send button.
curl -X GET "https://api.testingapis.com/ws/echo" \
-H "X-TestingApis-Key: YOUR_API_KEY"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!")Sign in to see the details
The parameters, request and response examples and the live Try it panel for these endpoints are for signed-in members. Accounts are free and take a few seconds to create.