From cca82d35f6fb53f79f4b44b75bc9dba4a931de8b Mon Sep 17 00:00:00 2001 From: Yonle Date: Sun, 7 Jan 2024 16:20:24 +0700 Subject: [PATCH] give JSON body example of relay response. Signed-off-by: Yonle --- 200.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/200.md b/200.md index eafc99c..f9e3244 100644 --- a/200.md +++ b/200.md @@ -37,7 +37,7 @@ Request URL Examples: - `https://my-relay.com/__nostr/req?kinds=0,1&limit=10` - `https://my-relay.com/__nostr/req?authors=12345,67890` -To send event to relay, Client will need to make POST request to `publish` endpoint with POST body containing the JSON of the event. +To send event to relay, Client will need to make POST request to `publish` endpoint with POST body containing the JSON blob of the event. ### From relay to client: sending responses and notices @@ -51,3 +51,16 @@ Relay may also respond with HTTP status code: - `200`: OK / Success - `400`: Invalid Request - `500`: Relay/Server error + +Response JSON body example: + +```json +{ + "results": [ + { "id": "...", "kind": 1, ... }, + { "id": "...", "kind": 1, ... }, + ... + ], + "notice": "" +} +```