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 moreRedirectortype.Declaration
Swift
public enum Behavior : Sendable -
Returns a
Redirectorwith a.followBehavior.Declaration
Swift
public static let follow: Redirector -
Returns a
Redirectorwith a.doNotFollowBehavior.Declaration
Swift
public static let doNotFollow: Redirector -
Declaration
Swift
public func task(_ task: URLSessionTask, willBeRedirectedTo request: URLRequest, for response: HTTPURLResponse, completion: @escaping (URLRequest?) -> Void)
View on GitHub
Install in Dash