From cddb7a02eca45ecd1f230ae75ca79194daff7978 Mon Sep 17 00:00:00 2001 From: arthurfranca Date: Sun, 21 May 2023 19:18:58 -0300 Subject: [PATCH] Add missing response info --- 95.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/95.md b/95.md index 8f1d35f5a8..971e427373 100644 --- a/95.md +++ b/95.md @@ -33,6 +33,8 @@ The `filename` embedded in the file may not be honored by the relay, which can i Relays must reject the upload if the `payload` tag value contains an already used SHA-256 hash or it isn't the same of the received file. +The upload response is a json as follows: + ```js { nip95: { @@ -72,7 +74,7 @@ This is done to assure the same file hash result, no matter to how many relays o ## Download -Relays must make available the route path `nip95/` with `GET` method for file download. +Relays must make available the route path `/nip95/` with `GET` method for file download. Clients should send a `GET` request to the relay url in the format `https://relay.domain/nip95/?r=relay.domain2&r=relay.domain3`. @@ -80,8 +82,10 @@ If the relay doesn't have the file anymore, it should issue a 302 http redirect ## Deletion -Relays must make available the route path `nip95/` with `DELETE` method for file deletion. +Relays must make available the route path `/nip95/` with `DELETE` method for file deletion. Clients should send a `DELETE` request to the relay url in the format `https://relay.domain/nip95/`. It must include a NIP-98 `Authorization` header. The relay should reject deletes from users other than the original uploader. + +The response is similar to the json sent on uploads.