[whatwg] Fetch: asFormData()

The as* methods do not check MIME at the moment, except for asBlob(),
which does it so it can store it along with the bytes.

Do we want to keep that tradition and have both asFormData() and
asURLSearchParams() or should we embed some smarts in the asFormData()
algorithm? (FormData is basically a more general URLSearchParams as it
can handle Blob/File objects as well as strings.)

We did just discuss layering, but I feel that including support for
the most common form submission formats is not an undue burden on the
Fetch library. They should be part of Fetch in my opinion.

(There's still the outstanding issue of defining multipart/form-data
parsing/serializing. Any volunteers? I noticed
https://github.com/masinter/multipart-form-data/ but it seems not very
far along.)


-- 
http://annevankesteren.nl/

Received on Wednesday, 25 June 2014 11:50:38 UTC