NIP-200: Respond with http status code instead

Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
Yonle 2024-01-06 07:33:03 +07:00
parent c6033f7eda
commit 61cb6ffc6c

7
200.md
View File

@ -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: 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. - `results`: Array of relay response. Usually contain events requested by client.
- `notice`: Human readable error. - `notice`: Human readable error.
Relay may also respond with HTTP status code:
- `200`: OK / Success
- `400`: Invalid Request
- `500`: Relay/Server error