From 38105a4b1be7df56feabdce0174aa4b2e3c9704b Mon Sep 17 00:00:00 2001 From: y9Kap Date: Mon, 23 Oct 2023 00:00:48 +0300 Subject: [PATCH] fix(#76-support-auth-header): add meetingId field to request --- .../engine/ktor/requests/meetings/MeetingsEngine.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 a8a43984..a3a55de9 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 @@ -66,7 +66,15 @@ internal class MeetingsEngine( put("pagingId", pagingId?.string) } - val string = post(url.string, jsonObject, httpClient, request) + val string = httpClient.get(url.string) { + setBody( + TextContent( + text = jsonObject.toString(), + contentType = ContentType.Application.Json + ) + ) + header("Api-Version", request.apiVersion.int.toString()) + }.body() val response = Json.decodeFromString(string).result @@ -204,6 +212,7 @@ internal class MeetingsEngine( val url = baseUrl / "meetings" / "participants" / "list" val jsonObject = buildJsonObject { + put("meetingId", request.meetingId.string) put("amount", request.amount.int) put("pagingId", request.pagingId?.string) }