ktor-client-core / io.ktor.client.features / HttpCallValidator

HttpCallValidator

class HttpCallValidator

Response validator feature is used for validate response and handle response exceptions.

See also Config for additional details.

Types

Companion

companion object Companion : HttpClientFeature<Config, HttpCallValidator>

Config

class Config

HttpCallValidator configuration.

Constructors

<init>

HttpCallValidator(responseValidators: List<ResponseValidator>, callExceptionHandlers: List<CallExceptionHandler>)

Response validator feature is used for validate response and handle response exceptions.

Companion Object Properties

key

val key: AttributeKey<HttpCallValidator>

The AttributeKey for this feature.

Companion Object Functions

install

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

Installs the feature class for a HttpClient defined at scope.

prepare

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

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