Request/response
Each request sent to the WebSocket server must contain a type of operation (op
) and a unique request ID (id
). It's best to start with 1 and after each request increase this value by 1.
Sample request:
{ "op": "ping", "id": 220 }
Each response from the websocket server contains
class
=resp
, the same id
as previously sent in the request, and a success
(boolean) field. When success
is false
, the error
(string) field with the error description is also included.Sample response for success:
{ "class": "resp", "id": 220, "success": true }
Sample response for error:
{ "class": "resp", "id": 220, "success": false, "error": "Missing data" }
No Comments