ClientConfig

actual class ClientConfig
actual class ClientConfig
expect class ClientConfig
actual class ClientConfig

Constructors

Link copied to clipboard
constructor(followRedirects: Boolean = true, followSslRedirects: Boolean = true, connectTimeoutMillis: Long = 10000, readTimeoutMillis: Long = 10000, writeTimeoutMillis: Long = 10000, proxy: String? = null, agent: String = "Kaptos/Android", likeAgent: UserAgent? = null, retryOnServerErrors: Int = 0, maxRetries: Int = 0, cache: Boolean = false)
constructor(followRedirects: Boolean = true, agent: String = "Kaptos/Darwin", likeAgent: UserAgent? = null, requestTimeout: Long = 10000, retryOnServerErrors: Int = 0, maxRetries: Int = 0, cache: Boolean = false, proxy: String? = null)
constructor(pipelining: Boolean = false, pipelineMaxSize: Int = 20, followRedirects: Boolean = true, maxConnectionsPerRoute: Int = 100, maxConnectionsCount: Int = 1000, connectTimeoutMillis: Long = 10000, keepAliveTime: Long = 5000, connectAttempts: Int = 5, retryOnServerErrors: Int = 0, maxRetries: Int = 0, cache: Boolean = false, agent: String = "Kaptos/JVM", likeAgent: UserAgent? = null, requestTimeout: Long = 10000, connectTimeout: Long = 10000, proxy: String? = null)

Types

Link copied to clipboard
actual object Companion
actual object Companion
expect object Companion
actual object Companion

Properties

agent
Link copied to clipboard

Specifies the agent the node sees. Default is Kaptos.

Specifies the user agent. Default is Kaptos.

Specifies the user agent. Default is Kaptos.

cache
Link copied to clipboard

Enables or disables caching. Default is false.

Enables or disables caching. Default is false.

Enables or disables caching. Default is false.

Link copied to clipboard

Specifies the number of connect attempts. Default is 5.

Link copied to clipboard

Specifies a timeout for establishing a connection with a node.

connectTimeoutMillis
Link copied to clipboard

Specifies the connection timeout in milliseconds. Default is 10000.

Specifies the connect timeout in milliseconds. Default is 10000L.

followRedirects
Link copied to clipboard

Specifies whether the client should follow redirects. Default is true.

Specifies whether the client should follow redirects. Default is true.

Specifies whether the client should follow redirects. Default is true.

Link copied to clipboard

Specifies whether the client should follow SSL redirects. Default is true.

Link copied to clipboard

Specifies the keep alive time in milliseconds. Default is 5000L.

likeAgent
Link copied to clipboard

Use a like agent. If this is set, the agent field will be ignored.

var likeAgent: UserAgent?

Use a like agent. If this is set, the agent field will be ignored.

Use a like agent. If this is set, the agent field will be ignored.

Link copied to clipboard

Specifies the maximum number of connections used to make requests. Default is 1000.

Link copied to clipboard

Specifies the maximum number of connections per route. Default is 100.

maxRetries
Link copied to clipboard

Specifies how many times the client should retry on connection errors. Default is 0.

Specifies how many times the client should retry on connection errors. Default is 0.

Specifies how many times the client should retry on connection errors. Default is 0.

Link copied to clipboard

Specifies the maximum size of the pipeline. Default is 20.

Link copied to clipboard

Specifies whether the client should use pipelining. Default is false.

proxy
Link copied to clipboard

Specifies the proxy to use. Default is null.

Specifies the proxy to use. Default is null.

Specifies a proxy for the client to use.

Link copied to clipboard

Specifies the read timeout in milliseconds. Default is 10000.

requestTimeout
Link copied to clipboard

Specifies a timeout for a whole HTTP call, from sending a request to receiving a response.

Specifies a timeout for a whole HTTP call, from sending a request to receiving a response.

retryOnServerErrors
Link copied to clipboard

Specifies how many times the client should retry on server errors. Default is 0.

Specifies how many times the client should retry on server errors. Default is 0.

Specifies how many times the client should retry on server errors. Default is 0.

Link copied to clipboard

Specifies the write timeout in milliseconds. Default is 10000.