Created
July 7, 2025 06:14
-
-
Save arulwastaken/bf3d786863d492bacd7f4c445f970d8c to your computer and use it in GitHub Desktop.
iosMain/Common/HttpClient.ios.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.codingwitharul.bookmyslot.common | |
import io.ktor.client.HttpClient | |
import io.ktor.client.HttpClientConfig | |
import io.ktor.client.engine.darwin.Darwin | |
import io.ktor.client.plugins.HttpTimeout | |
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation | |
import io.ktor.client.plugins.defaultRequest | |
import io.ktor.client.request.header | |
import io.ktor.serialization.kotlinx.json.json | |
import kotlinx.serialization.ExperimentalSerializationApi | |
import kotlinx.serialization.json.Json | |
actual fun httpClient(config: HttpClientConfig<*>.() -> Unit): HttpClient = HttpClient(Darwin) { | |
config(this) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment