RequestInterceptor

public protocol RequestInterceptor : RequestAdapter, RequestRetrier

Type that provides both RequestAdapter and RequestRetrier functionality.

  • adapt(_:for:completion:) Extension method

    Declaration

    Swift

    @preconcurrency
    public func adapt(_ urlRequest: URLRequest, for session: Session, completion: @Sendable @escaping (Result<URLRequest, any Error>) -> Void)
  • Declaration

    Swift

    @preconcurrency
    public func retry(_ request: Request,
                      for session: Session,
                      dueTo error: any Error,
                      completion: @Sendable @escaping (RetryResult) -> Void)

Available where Self == DeflateRequestCompressor

Available where Self == Interceptor

Available where Self == RetryPolicy

Available where Self == ConnectionLostRetryPolicy