Redirector
public struct Redirector
extension Redirector: RedirectHandler
Redirector
is a convenience RedirectHandler
making it easy to follow, not follow, or modify a redirect.
-
Defines the behavior of the
See moreRedirector
type.Declaration
Swift
public enum Behavior : Sendable
-
Returns a
Redirector
with a.follow
Behavior
.Declaration
Swift
public static let follow: Redirector
-
Returns a
Redirector
with a.doNotFollow
Behavior
.Declaration
Swift
public static let doNotFollow: Redirector
-
Declaration
Swift
public func task(_ task: URLSessionTask, willBeRedirectedTo request: URLRequest, for response: HTTPURLResponse, completion: @escaping (URLRequest?) -> Void)