Re: Fetch API

On Sun, Jun 1, 2014 at 8:06 AM, Domenic Denicola
<> wrote:
> - HeaderMap should have a constructor that takes an iterable of [key, value] pairs, in the same way Map does.

Yeah, waiting for IDL hooks that would work here ;-)

> - 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("", {
>   headers: {
>     "X-Foo": "Bar"
>   }
> });
> instead of, assuming a constructor is added,
> fetch("", {
>   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. Part of the problem here is how
to best represent HTTP headers. See for more


Received on Tuesday, 3 June 2014 15:50:34 UTC