Skip to content

Commit

Permalink
icerockdev#178 fixed dynamic user agent feature to plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorofeev committed Jul 29, 2022
1 parent d34f992 commit 1d40381
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package dev.icerock.moko.network.features

import io.ktor.client.HttpClient
import io.ktor.client.features.HttpClientFeature
import io.ktor.client.plugins.HttpClientPlugin
import io.ktor.client.request.HttpRequestPipeline
import io.ktor.client.request.header
import io.ktor.http.HttpHeaders
Expand All @@ -16,7 +16,7 @@ class DynamicUserAgent(
) {
class Config(var agentProvider: () -> String? = { null })

companion object Feature : HttpClientFeature<Config, DynamicUserAgent> {
companion object Feature : HttpClientPlugin<Config, DynamicUserAgent> {
override val key: AttributeKey<DynamicUserAgent> = AttributeKey("DynamicUserAgent")

override fun prepare(block: Config.() -> Unit): DynamicUserAgent =
Expand Down

0 comments on commit 1d40381

Please sign in to comment.