fix: Remove charset from application/json content type

Per https://datatracker.ietf.org/doc/html/rfc8259, application/json does not have a charset parameter
This commit is contained in:
Nik Clayton 2024-07-20 15:01:55 +02:00 committed by GitHub
parent b97388a001
commit b58a67e0fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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)