From b58a67e0fab2921bba69392fb0a5c7402d272d7f Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Sat, 20 Jul 2024 15:01:55 +0200 Subject: [PATCH] fix: Remove charset from application/json content type Per https://datatracker.ietf.org/doc/html/rfc8259, application/json does not have a charset parameter --- MastodonSDK/Sources/MastodonSDK/Query/Query.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MastodonSDK/Sources/MastodonSDK/Query/Query.swift b/MastodonSDK/Sources/MastodonSDK/Query/Query.swift index 6affedf1d..f93d8af1b 100644 --- a/MastodonSDK/Sources/MastodonSDK/Query/Query.swift +++ b/MastodonSDK/Sources/MastodonSDK/Query/Query.swift @@ -28,7 +28,7 @@ extension RequestQuery { // A `Get` query only contains queryItems, it should not be `Encodable` extension RequestQuery where Self: Encodable { var contentType: String? { - return "application/json; charset=utf-8" + return "application/json" } var body: Data? { return try? Mastodon.API.encoder.encode(self)