ktor-client-core / io.ktor.client.features.observer / ResponseObserver

ResponseObserver

class ResponseObserver

Observe response feature.

Types

Config

class Config

Feature

companion object Feature : HttpClientFeature<Config, ResponseObserver>

Constructors

<init>

ResponseObserver(responseHandler: ResponseHandler)

Observe response feature.

Companion Object Properties

key

val key: AttributeKey<ResponseObserver>

The AttributeKey for this feature.

Companion Object Functions

install

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

Installs the feature class for a HttpClient defined at scope.

prepare

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

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