Type Aliases
The following type aliases are available globally.
-
Typealias for Output that is emitted by the
DataTaskPublisher
Declaration
Swift
public typealias HTTPResponse = (data: Data, response: HTTPURLResponse, status: HTTPStatusCode)
-
RedirectHandler
AsynchronousURLRequest redirect handler as described in URLSessionTaskDelegate
Declaration
Swift
public typealias RedirectHandler = ( _ original: HTTPURLResponse, _ redirect: URLRequest ) async -> URLRequest?
Parameters
original
the original response with a redirect status
redirect
the pre-composed URLRequest that follows the redirect
completionHandler
the function that takes the newRequest to follow or nil to not follow the redirect