From e3033634e351c511212c22137a6b32306af183e1 Mon Sep 17 00:00:00 2001 From: Marcin Wojnarowski Date: Wed, 10 Feb 2021 22:28:05 +0100 Subject: [PATCH] Add data field in websocket example --- src/en/contributing/websocket_http_api.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/en/contributing/websocket_http_api.md b/src/en/contributing/websocket_http_api.md index 8d70591..f6102ce 100644 --- a/src/en/contributing/websocket_http_api.md +++ b/src/en/contributing/websocket_http_api.md @@ -164,7 +164,7 @@ To receive websocket messages, you must join a room / context. The four availabl `websocat ws://127.0.0.1:8536/api/v2/ws -nt` A simple test command: -`{"op": "ListCategories"}` +`{"op": "ListCategories", "data": {}}` ### Testing with the WebSocket JavaScript API @@ -175,7 +175,8 @@ var ws = new WebSocket("ws://" + host + "/api/v2/ws"); ws.onopen = function () { console.log("Connection succeed!"); ws.send(JSON.stringify({ - op: "ListCategories" + op: "ListCategories", + data: {} })); }; ```