HttpRoute
public struct HttpRoute
extension HttpRoute: ExpressibleByArrayLiteral
extension HttpRoute: Equatable
extension HttpRoute: Hashable
An HTTP route represents a set of URL routing paths. Essentially, a set of routing paths can
simply be represented by an array of strings. However, this entity enables initializing HTTP
routes without having to explicitly convert all path components to String.
-
Initializes a new HTTP route.
Declaration
Swift
public init(_ paths: [Any])Parameters
parametersThe HTTP routing paths. All paths are converted to strings using the
String.init(describing:)initializer.
-
Declaration
Swift
public init(arrayLiteral elements: Any...) -
Declaration
Swift
public static func == (lhs: HttpRoute, rhs: HttpRoute) -> Bool -
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Combines the routing paths of two HTTP routes by appending the paths of the latter route to the paths of the former route.
Declaration
Swift
public static func + (lhs: HttpRoute, rhs: HttpRoute) -> HttpRoute
View on GitHub
HttpRoute Structure Reference