My Blog Posts

Kotlin Ktor 1.3.0 Released

Kotlin Ktor 1.3.0 Released


The current version focuses mainly on the HTTP client. Here you can find the entire change log for this version.

The client is a multi-platform library that supports JVM, JS, Android, and iOS and is now frequently used in cross-platform mobile apps. For the next versions, it is to make the server engine a multi-platform.

Other areas we're going to work on:

Now let's look at the new features of Ktor 1.3:

Configure Proxy

HttpClient Adds experimental support for the proxy. If you need to submit a request under proxy, you can configure the address in the relevant parameters:

HttpClient { 
    engine { 
        proxy = ProxyBuilder.http("http://proxy-host:3128")
    }
}

More information about how to configure for different platforms can be found here .

iOS engine

The iOS engine now offers a way to configure NSURLSession:

HttpClient(Ios) {
    engine {
        configureSession {
            networkServiceType = NSURLNetworkServiceTypeBackground
        }
    }
}

To learn more You can see here



Share this article


Comments (0)

Comment