diff --git a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/meetings/MeetingsEngine.kt b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/meetings/MeetingsEngine.kt index d3d91872..2e64ac2d 100644 --- a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/meetings/MeetingsEngine.kt +++ b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/meetings/MeetingsEngine.kt @@ -168,13 +168,15 @@ internal class MeetingsEngine( } val string = httpClient.post(url.string) { + headers { + append("Authorization", token.string) + } setBody( TextContent( text = jsonObject.toString(), contentType = ContentType.Application.Json ) ) - header("Authorization", token) }.body() val meeting = Json.decodeFromString(string).result diff --git a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/users/UsersEngine.kt b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/users/UsersEngine.kt index d3842622..436b71d6 100644 --- a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/users/UsersEngine.kt +++ b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/users/UsersEngine.kt @@ -77,13 +77,17 @@ internal class UsersEngine( } val string = httpClient.post(url.string) { + headers { + append("Authorization", token.string) + } setBody( TextContent( text = jsonObject.toString(), contentType = ContentType.Application.Json ) + ) - header("Authorization", token) + }.body() val user = Json.decodeFromString(string).result