W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

Re: Fetch API

From: Jake Archibald <jaffathecake@gmail.com>
Date: Tue, 3 Jun 2014 17:38:39 +0100
Message-ID: <CAJ5xic_wUo2vLf6se-t1ZLwZKBrNMTN9KYCRsytE245x2VG_vQ@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Domenic Denicola <domenic@domenicdenicola.com>, public-script-coord <public-script-coord@w3.org>, Joshua Bell <jsbell@chromium.org>, Jungkee Song <jungkee.song@samsung.com>, Yehuda Katz <wycats@gmail.com>, Alex Russell <slightlyoff@google.com>, Jonas Sicking <jonas@sicking.cc>, Tobie Langel <tobie.langel@gmail.com>, WebApps WG <public-webapps@w3.org>
On 3 June 2014 16:50, Anne van Kesteren <annevk@annevk.nl> wrote:

> On Sun, Jun 1, 2014 at 8:06 AM, Domenic Denicola
> <domenic@domenicdenicola.com> wrote:
>
> - I like HeaderMap a lot, but for construction purposes, I wonder if a
> shorthand for the usual case could be provided. E.g. it would be nice to be
> able to do
> >
> > fetch("http://example.com", {
> >   headers: {
> >     "X-Foo": "Bar"
> >   }
> > });
> >
> > instead of, assuming a constructor is added,
> >
> > fetch("http://example.com", {
> >   headers: new HeaderMap([
> >     ["X-Foo", "Bar"]
> >   ])
> > });
>
> Yeah, it's not clear to me what is best here. An object whose keys are
> ByteString and values are either ByteString or a sequence of
> ByteString? I agree that we want this.


I vote ByteString: ByteString. If you want something more complicated,
provide a HeaderMap or mutate after construction.
Received on Tuesday, 3 June 2014 16:39:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:21 UTC