[whatwg/xhr] Allow FormData constructor to accept array or object too (#202)

Like the URLSearchParams allow the FormData constructor able to accept a iterable array or object
instead of having to manually append everything

Current way of solving things:
```js
var data = ['foo', 'bar']
var data = {foo: 'bar'}

var fd = new FormData()

for (let [key, val] of new URLSearchParams(data)) {
  fd.append(key, val)
}

// or one-liner 
new URLSearchParams(data).forEach(args => fd.append(...args))

```

Suggested way
```js
var data = ['foo', 'bar']
var data = {foo: 'bar'}

var fd = new FormData(data)
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/xhr/issues/202

Received on Wednesday, 18 April 2018 10:29:19 UTC