Re: [whatwg] Fetch: asFormData()

On Wed, Jun 25, 2014 at 4:59 PM, Anne van Kesteren <annevk@annevk.nl> wrote:
> 1) Have asFormData() check the MIME type for urlencoded. If it is
> urlencoded, urlencoded-parse into FormData. Otherwise, formdata-parse
> into FormData.
>
> 1a) Like 1), but check MIME in the otherwise clause. Reject if neither
> MIME type is there.

I went with this solution. You actually need the MIME type for
multipart/form-data to get the boundary. See
http://fetch.spec.whatwg.org/#concept-fetchbodystream-as-generic for
details on the algorithm.


-- 
http://annevankesteren.nl/

Received on Monday, 30 June 2014 14:08:28 UTC