From 287e36c95897ee16785f2982eeae82b436ef0efc Mon Sep 17 00:00:00 2001 From: sanderPostma Date: Tue, 5 Nov 2024 14:42:14 +0100 Subject: [PATCH] chore: AcceptCharset test version --- modules/logger/build.gradle.kts | 6 ++++++ .../kotlin/com/sphereon/oid/fed/client/fetch/Fetch.js.kt | 1 + .../kotlin/com/sphereon/oid/fed/client/fetch/Fetch.jvm.kt | 1 + 3 files changed, 8 insertions(+) diff --git a/modules/logger/build.gradle.kts b/modules/logger/build.gradle.kts index 138444fb..a0c1bfcf 100644 --- a/modules/logger/build.gradle.kts +++ b/modules/logger/build.gradle.kts @@ -20,5 +20,11 @@ kotlin { implementation(libs.kermit.logging) } } + + val jsMain by getting { + dependencies { + implementation(libs.kermit.logging) + } + } } } diff --git a/modules/openid-federation-client/src/jsMain/kotlin/com/sphereon/oid/fed/client/fetch/Fetch.js.kt b/modules/openid-federation-client/src/jsMain/kotlin/com/sphereon/oid/fed/client/fetch/Fetch.js.kt index efb91b73..04cff267 100644 --- a/modules/openid-federation-client/src/jsMain/kotlin/com/sphereon/oid/fed/client/fetch/Fetch.js.kt +++ b/modules/openid-federation-client/src/jsMain/kotlin/com/sphereon/oid/fed/client/fetch/Fetch.js.kt @@ -92,6 +92,7 @@ class DefaultFetchJSImpl : IFetchCallbackServiceJS { return@async getHttpClient().await().get(endpoint) { headers { append(HttpHeaders.Accept, "application/entity-statement+jwt") + append(HttpHeaders.AcceptCharset, "ascii, utf-8") } }.body() as String }.asPromise() diff --git a/modules/openid-federation-client/src/jvmMain/kotlin/com/sphereon/oid/fed/client/fetch/Fetch.jvm.kt b/modules/openid-federation-client/src/jvmMain/kotlin/com/sphereon/oid/fed/client/fetch/Fetch.jvm.kt index a84dcb73..ec76271d 100644 --- a/modules/openid-federation-client/src/jvmMain/kotlin/com/sphereon/oid/fed/client/fetch/Fetch.jvm.kt +++ b/modules/openid-federation-client/src/jvmMain/kotlin/com/sphereon/oid/fed/client/fetch/Fetch.jvm.kt @@ -21,6 +21,7 @@ class DefaultFetchJvmImpl : IFetchCallbackService { return getHttpClient().get(endpoint) { headers { append(HttpHeaders.Accept, "application/entity-statement+jwt") + append(HttpHeaders.AcceptCharset, "ascii, utf-8") } }.body() as String }