-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Currently, body data to be attached to a request via the httpBody property is either encoded as JSON in the case of APIotaCodableEndpoint or encoded as URL-encoded form data in the case of APIotaURLEncodedFormEndpoint.
Instead, it would probably be better if two parameter encoders existed for both use cases, which factor out the body data encoding from the APIotaCodableEndpoint protocol and remove the need for the APIotaURLEncodedFormEndpoint protocol altogether. In the case of URL-encoded form data, the destination for that data should be configurable (i.e. HTTP method dependent, explicitly appended to the request query string, or explicitly sets request body).
The Content-Type header of the request after having parameters encoded to it should be set automatically to the appropriate value (related Issue: #11 ).
Encoding multipart form data (see: #13) should also form part of this solution.