elm / http

Make HTTP requests in Elm
https://package.elm-lang.org/packages/elm/http/latest
BSD 3-Clause "New" or "Revised" License
155 stars 46 forks source link

Support for application/x-www-form-urlencoded ? #78

Open paulmillar opened 3 weeks ago

paulmillar commented 3 weeks ago

It looks like http currently lacks support for sending POST requests with application/x-www-form-urlencoded.

There is support for sending a body with multiple distinct items: Http.multipartBody. However, this seems to be limited to sending multipart/form-data requests.

There are some scenarios where the server expects the client to send POST requests with multiple parts that are combined according to the application/x-www-form-urlencoded media type, and won't accept POST requests encoded according to the multipart/form-data media type.

For comparison, elm-http-builder supports withUrlEncodedBody which seems to add support for application/x-www-form-urlencoded via withUrlEncodedBody.