Redirector - SwiftDocOrg/Alamofire GitHub Wiki
Redirector
Redirector is a convenience RedirectHandler making it easy to follow, not follow, or modify a redirect.
public struct Redirector
Inheritance
Initializers
init(behavior:)
Creates a Redirector instance from the Behavior.
public init(behavior: Behavior)
Parameters
- behavior: The
Behavior.
Properties
follow
Returns a Redirector with a .follow Behavior.
let follow
doNotFollow
Returns a Redirector with a .doNotFollow Behavior.
let doNotFollow
behavior
The Behavior of the Redirector.
let behavior: Behavior
Methods
task(_:willBeRedirectedTo:for:completion:)
public func task(_ task: URLSessionTask, willBeRedirectedTo request: URLRequest, for response: HTTPURLResponse, completion: @escaping (URLRequest?) -> Void)