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

Redirector

mattt edited this page Sep 18, 2020 · 2 revisions

Redirector

Redirector is a convenience RedirectHandler making it easy to follow, not follow, or modify a redirect.

public struct Redirector

Inheritance

RedirectHandler

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)
Types
Protocols
Global Typealiases
Clone this wiki locally