Package io.ktor.client.features
Types
Feature that provides observable progress for uploads and downloads
Response exception handler method.
Bad client request exception.
Object for installing io.ktor.util.converters.DataConversion as feature
Feature is used to set request default parameters.
Response validator feature is used for validate response and handle response exceptions.
Base interface representing a HttpClient feature.
HttpClient feature that encodes String request bodies to TextContent and processes the response body as String.
HttpClient feature that handles http redirect
This exception is thrown in case request timeout exceeded.
HttpSend pipeline interceptor function
HttpSend pipeline interceptor function backward compatible with previous implementation.
Client HTTP timeout feature. There are no default values, so default timeouts will be taken from engine configuration or considered as infinite time if engine doesn't provide them.
Unhandled redirect exception.
Base for default response exceptions.
Response validator method.
You could throw an exception to fail the response.
Thrown when too many actual requests were sent during a client call. It could be caused by infinite or too long redirect sequence. Maximum number of requests is limited by HttpSend.maxSendCount
Server error exception.
Default user-agent feature for HttpClient.
Functions
Default response validation. Check the response status code in range (0..299).
Install UserAgent feature with browser-like user agent.
Configure client charsets.
This exception is thrown in case connect timeout exceeded.
Convert long timeout in milliseconds to int value. To do that we need to consider HttpTimeout.INFINITE_TIMEOUT_MS as zero and convert timeout value to Int.
Convert long timeout in milliseconds to long value. To do that we need to consider HttpTimeout.INFINITE_TIMEOUT_MS as zero and convert timeout value to Int.
Install UserAgent feature with browser-like user agent.
Set request default parameters.
Install default transformers. Usually installed by default so there is no need to use it unless you have disabled it via HttpClientConfig.useDefaultTransformers.
Find the feature installed in HttpClient.
Install HttpCallValidator with block configuration.
Registers listener to observe download progress.
Registers listener to observe upload progress.
This exception is thrown in case socket timeout (read or write) exceeded.
Adds timeout boundaries to the request. Requires HttpTimeout feature to be installed.
Properties
Terminate HttpClient.receivePipeline if status code is not successful (>=300).