[whatwg] why FormData dosen't support x-www-form-urlencoded ?

Hi all.

Sending FormData object with XHR, data serialized in multipart.
in sending file case fit with this interface.
but I wanna send string key/values in x-www-form-urlencoded format.
because it's more standard way for web.

```
var form = new FormData();
form.append('key1', 'value1');
form.append('key2', 'value2');

var xhr = new XMLHttpRequest();
xhr.open('POST', '/', true);
xhr.send(form);
// expected 'key1=value2&key2=value2'
// but actual multipart
```

if defaults to encode multipart.
I think we can add a option for serialize format.


why we can't do that ?

Jxck

Received on Sunday, 7 December 2014 02:33:40 UTC