twinstone / tdi

Turbocharged DOM Infusion
Apache License 2.0
6 stars 1 forks source link

All forms are currently sent with the "multipart/form-data" header. Although there is no <input type ="file"> in the form. #34

Closed bretproft closed 7 years ago

bretproft commented 7 years ago

Environment

Steps to reproduce Submit a form with text inputs only (TDI class included ;)).

Observed behaviour The POST is sent with "multipart/form-data" header. Although it should contain a "application/x-www-form-urlencoded" header.

Related to the #11 probably..

centi commented 7 years ago

I used FormData for all forms with POST method, which is wrong. When using FormData interface, the data are always sent as multipart, see: https://developer.mozilla.org/en/docs/Web/API/FormData

Now only the forms with file uploads use FormData.