RequestAdapter - SwiftDocOrg/Alamofire GitHub Wiki
RequestAdapter
A type that can inspect and optionally adapt a URLRequest in some manner if necessary.
public protocol RequestAdapter
Requirements
adapt(_:for:completion:)
Inspects and adapts the specified URLRequest in some manner and calls the completion handler with the Result.
func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result<URLRequest, Error>) -> Void)
Parameters
- urlRequest: The
URLRequestto adapt. - session: The
Sessionthat will execute theURLRequest. - completion: The completion handler that must be called when adaptation is complete.