-
Creates an instance using the provided closure.
Declaration
Swift
@preconcurrency public init(_ adaptHandler: @escaping AdaptHandler)
Parameters
adaptHandler
AdaptHandler
closure to be executed when handling request adaptation. -
Declaration
Swift
@preconcurrency open func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping @Sendable (Result<URLRequest, any Error>) -> Void)
-
Declaration
Swift
@preconcurrency open func adapt(_ urlRequest: URLRequest, using state: RequestAdapterState, completion: @escaping @Sendable (Result<URLRequest, any Error>) -> Void)