Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a POST request in Federation request signing example #1721

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading