From e369918a12347884898d7c3e9bebf92731db55d5 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Wed, 26 Jan 2022 16:30:51 -0600 Subject: Disabled automatic storage of cookies in iOS engine (https://youtrack.jetbrains.com/issue/KTOR-3748), so we can handle them manually. --- .../client/infrastructure/HttpClientProvider.kt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 shared/src/iosMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/HttpClientProvider.kt (limited to 'shared/src/iosMain/kotlin/mx/trackermap/TrackerMap') diff --git a/shared/src/iosMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/HttpClientProvider.kt b/shared/src/iosMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/HttpClientProvider.kt new file mode 100644 index 0000000..1ccb2e6 --- /dev/null +++ b/shared/src/iosMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/HttpClientProvider.kt @@ -0,0 +1,16 @@ +package mx.trackermap.TrackerMap.client.infrastructure + +import io.ktor.client.* +import io.ktor.client.engine.ios.* + +actual class HttpClientProvider { + actual fun getHttpClient(): HttpClient { + return HttpClient(Ios) { + engine { + configureSession { + HTTPCookieStorage = null + } + } + } + } +} \ No newline at end of file -- cgit v1.2.3