From 2320b91a5f70eb6dd6a4e5dbb608130e0df67a22 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Thu, 28 Jul 2022 13:24:57 +0100 Subject: [PATCH] Apply suggestions from code review --- content/client-server-api/_index.md | 2 +- content/identity-service-api.md | 5 +++-- content/server-server-api.md | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/content/client-server-api/_index.md b/content/client-server-api/_index.md index 7a1f9e4d..f391aeb1 100644 --- a/content/client-server-api/_index.md +++ b/content/client-server-api/_index.md @@ -32,7 +32,7 @@ Similarly, all endpoints require the server to return a JSON object, with the exception of 200 responses to [`GET /_matrix/media/v3/download/{serverName}/{mediaId}`](#get_matrixmediav3downloadservernamemediaid) and [`GET /_matrix/media/v3/thumbnail/{serverName}/{mediaId}`](#get_matrixmediav3thumbnailservernamemediaid). -Servers should include a `Content-Type` header of `application/json` for all JSON responses. +Servers msut include a `Content-Type` header of `application/json` for all JSON responses. All JSON data, in requests or responses, must be encoded using UTF-8. diff --git a/content/identity-service-api.md b/content/identity-service-api.md index 58fc9019..c4d4a31a 100644 --- a/content/identity-service-api.md +++ b/content/identity-service-api.md @@ -43,10 +43,11 @@ communication. All `POST` and `PUT` endpoints, with the exception (for historical reasons) of [`POST /_matrix/identity/v2/account/logout`](#post_matrixidentityv2accountlogout), require the client to supply a request body containing a (potentially empty) -JSON object. Clients are *not* required to supply a `Content-Type` header. +JSON object. Clients should supply a `Content-Type` header of `application/json` +for all requests with JSON bodies, but this is not required. Similarly, all endpoints require the server to return a JSON object. Servers -should include a `Content-Type` header of `application/json` for all JSON +must include a `Content-Type` header of `application/json` for all JSON responses. All JSON data, in requests or responses, must be encoded using UTF-8. diff --git a/content/server-server-api.md b/content/server-server-api.md index fa485d17..2a034c35 100644 --- a/content/server-server-api.md +++ b/content/server-server-api.md @@ -53,10 +53,11 @@ specified in future as optional extensions. All `POST` and `PUT` endpoints require the requesting server to supply a request body containing a (potentially empty) JSON object. Requesting servers -are *not* required to supply a `Content-Type` header. +should supply a `Content-Type` header of `application/json` for all requests +with JSON bodies, but this is not required. Similarly, all endpoints in this specification require the destination server -to return a JSON object. Servers should include a `Content-Type` header of +to return a JSON object. Servers must include a `Content-Type` header of `application/json` for all JSON responses. All JSON data, in requests or responses, must be encoded using UTF-8.