HTTPClientError
Possible client errors.
struct HTTPClientError
Possible client errors.
struct HTTPClientError
import AsyncHTTPClient
This package provides simple HTTP Client library built on top of SwiftNIO.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Error : Sendable
A type representing an error value that can be thrown.
protocol Sendable
static let alreadyShutdown: HTTPClientError
Client is shutdown and cannot be used for new requests.
static let bodyLengthMismatch: HTTPClientError
Body length is not equal to Content-Length
.
static let cancelled: HTTPClientError
Request was cancelled.
static let connectTimeout: HTTPClientError
Creating a new tcp connection timed out
static let contentLengthMissing: HTTPClientError
Request does not contain Content-Length
header.
static let deadlineExceeded: HTTPClientError
The request deadline was exceeded. The request was cancelled because of this.
static let emptyHost: HTTPClientError
URL does not contain host.
static let emptyScheme: HTTPClientError
URL does not contain scheme.
static let getConnectionFromPoolTimeout: HTTPClientError
Aquiring a HTTP connection from the connection pool timed out.
static let httpProxyHandshakeTimeout: HTTPClientError
The http proxy connection creation timed out.
static let identityCodingIncorrectlyPresent: HTTPClientError
Request contains invalid identity encoding.
static let invalidProxyResponse: HTTPClientError
Proxy response was invalid.
static let invalidURL: HTTPClientError
URL provided is invalid.
static let missingSocketPath: HTTPClientError
URL does not contain a socketPath as a host for http(s)+unix shemes.
static let proxyAuthenticationRequired: HTTPClientError
Proxy Authentication Required.
static let readTimeout: HTTPClientError
Request timed out while waiting for response.
static let redirectCycleDetected: HTTPClientError
Redirect Cycle detected.
static let redirectLimitReached: HTTPClientError
Redirect Limit reached.
static let remoteConnectionClosed: HTTPClientError
Remote connection was closed unexpectedly.
static let requestStreamCancelled: HTTPClientError
The remote server responded with a status code >= 300, before the full request was sent. The request stream was therefore cancelled
static var shutdownUnsupported: HTTPClientError { get }
The globally shared singleton HTTPClient
cannot be shut down.
static let socksHandshakeTimeout: HTTPClientError
The socks handshake timed out.
static let tlsHandshakeTimeout: HTTPClientError
The tls handshake timed out.
static let traceRequestWithBody: HTTPClientError
A body was sent in a request with method TRACE.
static let uncleanShutdown: HTTPClientError
Unclean shutdown.
static let writeAfterRequestSent: HTTPClientError
Body part was written after request was fully sent.
static let writeTimeout: HTTPClientError
Request timed out.
static func invalidHeaderFieldNames(_ names: [String]) -> HTTPClientError
Header field names contain invalid characters.
static func invalidHeaderFieldValues(_ values: [String]) -> HTTPClientError
Header field values contain invalid characters.
static func serverOfferedUnsupportedApplicationProtocol(_ proto: String) -> HTTPClientError
The remote server only offered an unsupported application protocol
static func unsupportedScheme(_ scheme: String) -> HTTPClientError
Provided URL scheme is not supported, supported schemes are: http
and https
var description: String { get }
var shortDescription: String { get }
Short description of the error that can be used in case a bounded set of error descriptions is expected, e.g. to include in metric labels. For this reason the description must not contain associated values.
static let chunkedSpecifiedMultipleTimes: HTTPClientError
Request contains multiple chunks definitions.
static let httpEndReceivedAfterHeadWith1xx: HTTPClientError
static let incompatibleHeaders: HTTPClientError
Incompatible headers specified, for example Transfer-Encoding
and Content-Length
.
var localizedDescription: String { get }
Retrieve the localized description for this error.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.