Instance Propertyasync-http-client 1.23.0AsyncHTTPClient
maximumUsesPerConnection
The maximum number of times each connection can be used before it is replaced with a new one. Use nil
(the default) if no limit should be applied to each connection.
var maximumUsesPerConnection: Int? { get set }
Other members in extension
Types
struct ConnectionPool
Connection pool configuration.
struct HTTPVersion
struct Proxy
Proxy server configuration Specifies the remote address of an HTTP proxy.
struct RedirectConfiguration
Specifies redirect processing settings.
struct Timeout
Timeout configuration.
Type members
init(certificateVerification: CertificateVerification, redirectConfiguration: RedirectConfiguration?, timeout: Timeout, connectionPool: TimeAmount, proxy: Proxy?, ignoreUncleanSSLShutdown: Bool, decompression: Decompression, backgroundActivityLogger: Logger?
) init(certificateVerification: CertificateVerification, redirectConfiguration: RedirectConfiguration?, timeout: Timeout, maximumAllowedIdleTimeInConnectionPool: TimeAmount, proxy: Proxy?, ignoreUncleanSSLShutdown: Bool, decompression: Decompression
) init(certificateVerification: CertificateVerification, redirectConfiguration: RedirectConfiguration?, timeout: Timeout, proxy: Proxy?, ignoreUncleanSSLShutdown: Bool, decompression: Decompression
) init(tlsConfiguration: TLSConfiguration?, redirectConfiguration: RedirectConfiguration?, timeout: Timeout, connectionPool: ConnectionPool, proxy: Proxy?, ignoreUncleanSSLShutdown: Bool, decompression: Decompression
) init(tlsConfiguration: TLSConfiguration?, redirectConfiguration: RedirectConfiguration?, timeout: Timeout, proxy: Proxy?, ignoreUncleanSSLShutdown: Bool, decompression: Decompression
) static var singletonConfiguration: HTTPClient.Configuration
The
Configuration
forshared
which tries to mimic the platform’s default or prevalent browser as closely as possible.
Instance members
var connectionPool: ConnectionPool
Connection pool configuration.
var decompression: Decompression
Enables automatic body decompression. Supported algorithms are gzip and deflate.
var dnsOverride: [String : String]
Sometimes it can be useful to connect to one host e.g.
x.example.com
but request and validate the certificate chain as if we would connect toy.example.com
.dnsOverride
allows to do just that by mapping host names which we will request and validate the certificate chain, to a different host name which will be used to actually connect to.var enableMultipath: Bool
Whether
HTTPClient
will use Multipath TCP or not By default, don’t use itvar httpVersion: HTTPVersion
What HTTP versions to use.
var networkFrameworkWaitForConnectivity: Bool
Whether
HTTPClient
will let Network.framework sit in the.waiting
state awaiting new network changes, or fail immediately. Defaults totrue
, which is the recommended setting. Only set this tofalse
when attempting to trigger a particular error path.var proxy: Proxy?
Upstream proxy, defaults to no proxy.
var redirectConfiguration: RedirectConfiguration
Enables following 3xx redirects automatically.
var timeout: Timeout
Default client timeout, defaults to no
read
timeout and 10 secondsconnect
timeout.var tlsConfiguration: Optional<TLSConfiguration>
TLS configuration, defaults to
TLSConfiguration.makeClientConfiguration()
.
Show obsolete interfaces (1)
Hide obsolete interfaces
var ignoreUncleanSSLShutdown: Bool
Ignore TLS unclean shutdown error, defaults to
false
.