Package-level declarations
Types
Response exception handler method.
Response exception handler method. request is null if
Bad client request exception.
Object for installing io.ktor.util.converters.DataConversion as plugin
Sets default request parameters. Used to add common headers and URL for a request. Note that trailing slash in base URL and leading slash in request URL are important. The rules to calculate a final URL:
HttpCallValidator configuration.
Base interface representing a HttpClient plugin.
Charset configuration for HttpPlainText plugin.
Contains HttpRequestRetry configurations settings.
This exception is thrown in case the request timeout is exceeded. The request timeout is the time period required to process an HTTP call: from sending a request to receiving a response.
Data for the HttpRequestRetryEvent event. Contains a non-null response or cause but not both.
A context for HttpRequestRetry.Configuration.shouldRetry and HttpRequestRetry.Configuration.shouldRetryOnException
HttpSend pipeline interceptor function
An HttpTimeout extension configuration that is used during installation.
Unhandled redirect exception.
Base for default response exceptions.
Response validator method.
Configuration for SaveBodyPlugin
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.
Properties
Plugin that provides observable progress for uploads and downloads
Terminate HttpClient.receivePipeline if status code is not successful (>=300).
The response validator plugin is used for validating an HttpClient response and handling response exceptions.
HttpClient plugin that encodes String request bodies to TextContent and processes the response body as String.
A client's HTTP plugin that sets up HttpRequestBuilder.executionContext and completes it when the pipeline is fully processed.
A plugin that enables the client to retry failed requests. The default retry policy is 3 retries with exponential delay. Typical usages:
Occurs on request retry.
Occurs when receiving a response with a redirect message.
A plugin that allows you to configure the following timeouts:
SaveBodyPlugin saving the whole body in memory, so it can be received multiple times.
A plugin that adds a User-Agent
header to all requests.
Functions
Default response validation. Check the response status code in range (0..299).
Installs the UserAgent plugin with a browser-like user agent.
Configure client charsets.
This exception is thrown in case the connection timeout is exceeded. It indicates the client took too long to establish a connection with a server.
Converts a 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.
Converts 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.
Installs the UserAgent plugin with a CURL user agent.
Set default request parameters. See DefaultRequest
Install default transformers. Usually installed by default so there is no need to use it unless you have disabled it via HttpClientConfig.useDefaultTransformers.
Install HttpCallValidator with block configuration.
Registers listener to observe download progress.
Registers listener to observe upload progress.
Returns a plugin installed in HttpClient.
Returns a plugin installed in this client. Returns null
if the plugin was not previously installed.
Configures the HttpRequestRetry plugin on a per-request level.
Prevent saving response body in memory for the specific request.
This exception is thrown in case the socket timeout (read or write) is exceeded. It indicates the time between two data packets when exchanging data with a server was too long.
Adds timeout boundaries to the request. Requires the HttpTimeout plugin to be installed.