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
pathThe path of the endpoint.
methodThe HTTP method to use for the request.
parametersThe parameters to add to the query.
requestBodyThe request body to send with the request.
View on GitHub