KtorHttpExecutor

class KtorHttpExecutor(val httpClient: ERROR CLASS: Symbol not found for HttpClient = getHttpClientEngine()) : ApiExecutor

An ApiExecutor implementation that uses Ktor for making HTTP requests.

This executor can be configured with different timeout values. For more advanced customization, such as adding custom interceptors or plugins, you can create a pre-configured Ktor HttpClient and pass it to this class's constructor. The resulting KtorHttpExecutor instance can then be assigned to the DirectAuthenticationFlowBuilder.apiExecutor property.

See the Ktor Client documentation for more information on configuring Ktor clients.

Parameters

httpClient

The Ktor HttpClient to use for network requests. By default, a client is created using the expect method getHttpClientEngine() with OkHttp engine with HttpTimeout, HttpCookies, and HttpCache plugins installed for Android.

The timeout values can be adjusted in the default client by modifying the values in the HttpTimeout configuration block.

The HttpCookies and HttpCache plugins are default in memory implementations and can be replaced by configuring your own HttpClient instance.

Constructors

Link copied to clipboard
constructor(httpClient: ERROR CLASS: Symbol not found for HttpClient = getHttpClientEngine())

Properties

Link copied to clipboard
val httpClient: ERROR CLASS: Symbol not found for HttpClient

Functions

Link copied to clipboard
open suspend override fun execute(request: ApiRequest): ERROR CLASS: Symbol not found for Result<com/okta/authfoundation/api/http/ApiResponse>

Executes the given network request asynchronously.