HTTPRequest
public struct HTTPRequest
HTTP request.
-
HTTP method.
Declaration
Swift
public let method: HTTPMethod
-
HTTP request base URL.
Declaration
Swift
public let baseURL: URL
-
HTTP request path.
Declaration
Swift
public let path: String
-
HTTP Query items.
Declaration
Swift
public let queryItems: QueryItems?
-
HTTP request parameters.
Declaration
Swift
public let parameters: Parameters?
-
HTTP request headers.
Declaration
Swift
public let headers: Headers?
-
HTTP endpoint. Combines the base URL and the path to be used for a HTTP call.
Declaration
Swift
public var endpoint: URL
-
Initializes a HTTP request.
- Parameters:
- method: The HTTP method to use.
- baseURL: The HTTP base URL to use.
- path: The HTTP path to use.
- query: The HTTP query items to use.
- parameters: The HTTP parameters to use.
- headers: The HTTP headers to use.
Declaration
Swift
public init(method: HTTPMethod, baseURL: URL, path: String, queryItems: QueryItems?, parameters: Parameters?, headers: Headers?)
Parameters
method
The HTTP method to use.
baseURL
The HTTP base URL to use.
path
The HTTP path to use.
query
The HTTP query items to use.
parameters
The HTTP parameters to use.
headers
The HTTP headers to use.
- Parameters: