UserAgent

class UserAgent

Default user-agent feature for HttpClient.

Types

Config

class Config

Feature

companion object Feature : 
    HttpClientFeature<Config, UserAgent>

Constructors

<init>

UserAgent(agent: String)

Default user-agent feature for HttpClient.

Properties

agent

val agent: String

: value of user-agent header to set.

Companion Object Properties

key

The AttributeKey for this feature.

Companion Object Functions

install

fun install(feature: UserAgent, scope: HttpClient): Unit

Installs the feature class for a HttpClient defined at scope.

prepare

fun prepare(block: Config.() -> Unit): UserAgent

Builds a TFeature by calling the block with a TConfig config instance as receiver.