Skip to content

Commit

Permalink
Use a POST request in Federation request signing example (#1721)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
reivilibre committed Feb 28, 2024
1 parent 38260aa commit 2cb70e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelogs/server_server/newsfragments/1721.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarify Server-Server API request signing example by using the `POST` HTTP method, as `GET` requests don't have request bodies.
4 changes: 2 additions & 2 deletions content/server-server-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Step 1 sign JSON:

```
{
"method": "GET",
"method": "POST",
"uri": "/target",
"origin": "origin.hs.example.com",
"destination": "destination.hs.example.com",
Expand All @@ -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

Expand Down

0 comments on commit 2cb70e6

Please sign in to comment.