Request
public struct Request<ResponseType, ErrorResponseType> : Sendable
A description of a request. This will internally be mapped to a real URL request.
-
The path of the endpoint.
Declaration
Swift
public let path: String
-
The HTTP method to use for the request.
Declaration
Swift
public let method: HTTPMethod
-
The parameters to add to the query.
Declaration
Swift
public let parameters: Parameters?
-
The request body to send with the request.
Declaration
Swift
public let requestBody: RequestBody?
-
Create a new description of a request.
Declaration
Swift
public init(path: String, method: HTTPMethod, parameters: Parameters? = nil, requestBody: RequestBody? = nil)
Parameters
path
The path of the endpoint.
method
The HTTP method to use for the request.
parameters
The parameters to add to the query.
requestBody
The request body to send with the request.