Router
public final class Router<Route> where Route : RouteProtocol
This class is used to create instances of Router that can be used to start requests based on the given Route.
-
Router configuration
Declaration
Swift
public var configuration: Configuration?
-
Initialize with environment that overrides the one set by Environment.set(_).
Declaration
Swift
public init(environment: EnvironmentProtocol? = nil, configuration: Configuration? = nil)
-
Returns a Request that can be used later, e.g. for starting the request in a later time or canceling it.
Declaration
Swift
public func request(for route: Route) -> Request
Parameters
route
a RouteProtocol enum value