HTTPClient
public protocol HTTPClient
Protocol HTTPClient
-
Send the given request. The request will be processed by the list of
Interceptors
.Declaration
Swift
func send(request: URLRequest, interceptors: [Interceptor], redirect handler: RedirectHandler?) -> AnyPublisher<HTTPResponse, HTTPClientError>
Parameters
request
The request to be (modified and) sent.
interceptors
per request interceptors.
handler
handler that should be called in case of redirect.
Return Value
AnyPublisher
that emits a response asHTTPResponse
-
List of all active interceptors of the HTTP client.
Declaration
Swift
var interceptors: [Interceptor] { get }
-
send(request:
Extension methodinterceptors: ) Send the given request. The request will be processed by the list of
Interceptors
.Declaration
Swift
public func send(request: URLRequest, interceptors: [Interceptor]) -> AnyPublisher<HTTPResponse, HTTPClientError>
Parameters
request
The request to be (modified and) sent.
interceptors
per request interceptors.
Return Value
AnyPublisher
that emits a response asHTTPResponse
-
send(request:
Extension method) Send the given request.
Declaration
Swift
public func send(request: URLRequest) -> AnyPublisher<HTTPResponse, HTTPClientError>
Parameters
request
The request to be (modified and) sent.
Return Value
AnyPublisher
that emits a response asHTTPResponse