Adapter

open class Adapter : RequestInterceptor

Closure-based RequestAdapter.

  • Creates an instance using the provided closure.

    Declaration

    Swift

    public init(_ adaptHandler: @escaping AdaptHandler)

    Parameters

    adaptHandler

    AdaptHandler closure to be executed when handling request adaptation.

  • Declaration

    Swift

    open func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result<URLRequest, Error>) -> Void)