Skip to content

Instantly share code, notes, and snippets.

@Juanpe
Created March 24, 2019 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Juanpe/d953000cc55522c0f5f2312cd2a1d662 to your computer and use it in GitHub Desktop.
Save Juanpe/d953000cc55522c0f5f2312cd2a1d662 to your computer and use it in GitHub Desktop.
protocol RequestAdapter {
/// Inspects and adapts the specified `URLRequest` in some manner if necessary and returns the result.
///
/// - parameter urlRequest: The URL request to adapt.
///
/// - throws: An `Error` if the adaptation encounters an error.
///
/// - returns: The adapted `URLRequest`.
func adapt(_ urlRequest: URLRequest) throws -> URLRequest
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment