Chain

public protocol Chain

Handles the chaining of Interceptors.

  • The request that the chain hold at the moment

    Declaration

    Swift

    var request: URLRequest { get }
  • Launch the chain processing of the given input.

    Declaration

    Swift

    @available(*, deprecated, message: "Use async version instead")
    func proceedPublisher(request: URLRequest) -> AnyPublisher<HTTPResponse, HTTPClientError>

    Parameters

    request

    the URLRequest to proceed

    Return Value

    AnyPublisher that emits a response as HTTPClient.Response

  • proceedAsync(request:) Asynchronous

    Launch the chain processing of the given input.

    Note

    Only HTTPClientErrors are supposed to be thrown.

    Declaration

    Swift

    func proceedAsync(request: URLRequest) async throws -> HTTPResponse

    Parameters

    request

    the URLRequest to proceed

    Return Value

    Response emitted as HTTPClient.Response

  • proceed(request:) Extension method

    Launch the chain processing of the given input.

    Declaration

    Swift

    @available(*, deprecated, renamed: "proceedPublisher(request:﹚", message: "Use async version instead")
    public func proceed(request: URLRequest) -> AnyPublisher<HTTPResponse, HTTPClientError>

    Parameters

    request

    the URLRequest to proceed

    Return Value

    AnyPublisher that emits a response as HTTPClient.Response