Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

RequestAdapter

mattt edited this page Jan 26, 2020 · 2 revisions

RequestAdapter

A type that can inspect and optionally adapt a URLRequest in some manner if necessary.

public protocol RequestAdapter

Conforming Types

[`RequestInterceptor`](RequestInterceptor)

Required Methods

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 URLRequest to adapt.
  • session: The Session that will execute the URLRequest.
  • completion: The completion handler that must be called when adaptation is complete.
Types
Protocols
Global Typealiases
Clone this wiki locally