Re: Fetch API

On May 29, 2014 at 9:02:35 AM, Anne van Kesteren (annevk@annevk.nl) wrote:
> The plan is to implement and ship this fairly soon, so I figured I'd
> ask for review now, while we're still drafting the text:
>  
> http://fetch.spec.whatwg.org/#fetch-api
>  
> In particular I'd like feedback on the design of Request and Response
> classes, and the fetch() method.

Having these interfaces exposed is going to be great! 

Few small things that stood out for me...  

> enum RequestMode { "same-origin", "tainted cross-origin", "CORS", "CORS-with-forced-preflight" };

I think these are badly named (even though they use the names used in HTML and Fetch). It's going to be annoying to type these out for developers. 

I would change them to: 
enum RequestMode { "same-origin", "cors", "cors-tainted", "cors-preflight" };
 
And then map them to the appropriate concept in the specs.

> enum RequestOmitCredentialsMode { "always", "CORS", "never" };

The item "CORS" here is not self evident (unlike "always"/"never" modes). Can you find a better word?   

Received on Thursday, 29 May 2014 14:59:02 UTC