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: @escaping @Sendable (Result<URLRequest, any Error>) -> Void)
  • Declaration

    Swift

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

Available where Self == DeflateRequestCompressor

Available where Self == Interceptor

Available where Self == RetryPolicy

Available where Self == ConnectionLostRetryPolicy