RequestAdapter
public protocol RequestAdapter
A type that can inspect and optionally adapt a URLRequest
in some manner if necessary.
-
Inspects and adapts the specified
URLRequest
in some manner and calls the completion handler with the Result.Declaration
Swift
func adapt(_ urlRequest: URLRequest, completion: @escaping (_ result: Result<URLRequest>) -> Void)
Parameters
urlRequest
The
URLRequest
to adapt.completion
The completion handler that must be called when adaptation is complete.