Use a POST request in Federation request signing example (#1721)

* Use a POST request in Federation request signing example

Otherwise the GET request having a body is confusing, since it is not valid HTTP

* Newsfile
This commit is contained in:
reivilibre 2024-02-28 00:15:21 +00:00 committed by GitHub
parent 38260aabcc
commit 2cb70e6e3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -0,0 +1 @@
Clarify Server-Server API request signing example by using the `POST` HTTP method, as `GET` requests don't have request bodies.

View file

@ -290,7 +290,7 @@ Step 1 sign JSON:
```
{
"method": "GET",
"method": "POST",
"uri": "/target",
"origin": "origin.hs.example.com",
"destination": "destination.hs.example.com",
@ -311,7 +311,7 @@ condition applies throughout the request signing process.
Step 2 add Authorization header:
GET /target HTTP/1.1
POST /target HTTP/1.1
Authorization: X-Matrix origin="origin.hs.example.com",destination="destination.hs.example.com",key="ed25519:key1",sig="ABCDEF..."
Content-Type: application/json