W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2014

Re: [whatwg] Fetch: asFormData()

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 30 Jun 2014 16:08:03 +0200
Message-ID: <CADnb78g8U1SDXQQL66rNeg_Bt_5g8Ai3M9R+cBfZ-NhiEVj5hg@mail.gmail.com>
To: Jake Archibald <jaffathecake@gmail.com>
Cc: WHATWG <whatwg@whatwg.org>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:21 UTC