Structure
RestURLComponents
public struct RestURLComponents
This structure constructs URLs according to RFC 3986.
Reference
Properties
scheme
public let scheme: String
The URL scheme component.
host
public let host: String
The URL host component.
path
public let path: String
The URL path component.
params
public let params: [String: String]
The URL params component.
Methods
url(params:)
public func url(params: Bool = true) -> URL
Returns a constructed URL from its constituent parts.
Parameters
| Name | Type | Description |
|---|---|---|
| params | Bool |
Should the constructed query include parameters. |
Returns
The constructed URL.