From 61cb6ffc6cb7df385660db64d7f770b053f0dea0 Mon Sep 17 00:00:00 2001 From: Yonle Date: Sat, 6 Jan 2024 07:33:03 +0700 Subject: [PATCH] NIP-200: Respond with http status code instead Signed-off-by: Yonle --- 200.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/200.md b/200.md index 3d8abb1..eafc99c 100644 --- a/200.md +++ b/200.md @@ -43,6 +43,11 @@ To send event to relay, Client will need to make POST request to `publish` endpo Every NoH response is a JSON body that contain the following JSON field: -- `status`: Request status code in integer. `0` means OK, `1` means invalid request, `2` means relay error. - `results`: Array of relay response. Usually contain events requested by client. - `notice`: Human readable error. + +Relay may also respond with HTTP status code: + +- `200`: OK / Success +- `400`: Invalid Request +- `500`: Relay/Server error