Path
public struct Path : Equatable, ExpressibleByStringLiteral, ExpressibleByStringInterpolation
A path represents a path a request can query to
You can create paths using plain String, for instance:
extension Path {
static let user = "v1/users"
}
If you want to regroup a set of paths you can use your own "namespace" and add a forward declaration in `Path`.
Adding a declaration provide autocompletion when using it in `Request`.
```swift
enum MyPaths {
static let user: Path = "v1/users"
}
extension Path {
static let myPaths = MyPaths.self
}
let user: Path = .myPaths.user
-
relative path
Declaration
Swift
public let value: String
-
Declaration
Swift
public init(stringLiteral value: StringLiteralType)
-
Declaration
Swift
public init(stringInterpolation: DefaultStringInterpolation)
-
Declaration
Swift
public static func == (lhs: Path, rhs: String) -> Bool