APIotaURLEncodedFormEndpoint
public protocol APIotaURLEncodedFormEndpoint : APIotaCodableEndpoint where Self.Body == Data
Defines an API endpoint for a Client whose body is an URL encoded form.
The definition must include a requestBodyQueryItems
array.
-
A
URLQueryItem
array used for defining thehttpBody
of a initializedURLRequest
generated by the receiver.Declaration
Swift
var requestBodyQueryItems: [URLQueryItem] { get }
-
httpBody
Extension methodA
Body
which is UTF-8 encodedData
, computed fromrequestBodyQueryItems
.Declaration
Swift
var httpBody: Body? { get }
-
httpMethod
Extension methodThe
HTTPMethod
for the receiver is by definition set to POST.Declaration
Swift
var httpMethod: HTTPMethod { get }
-
request(baseUrlComponents:
Extension method) Declaration
Swift
func request(baseUrlComponents: URLComponents) throws -> URLRequest