This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23150 - Provide some example usage of fetch, request building, and response handling
Summary: Provide some example usage of fetch, request building, and response handling
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: Fetch (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+fetchspec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-04 07:06 UTC by Tab Atkins Jr.
Modified: 2016-08-15 11:18 UTC (History)
3 users (show)

See Also:


Attachments

Description Tab Atkins Jr. 2013-09-04 07:06:12 UTC
There's very little in the Fetch spec that helps other spec authors actually use it.  In particular, there's a ton of flags and variables you can set when building a request, without any guidance on what they commonly should be set to (besides the defaults).  There's also no information on what to actually do with a response after receiving it.
Comment 1 Arkadiusz Michalski (Spirit) 2014-12-04 00:56:14 UTC
I agree and want to add that I don't know why the Response interface can be invoke as constructor, when this can be useful in practice? Any case where this constructed Response object can be used (for example passing to some methods)?
Comment 2 Anne 2014-12-04 01:05:01 UTC
Arkadiusz, constructing a Response object is a developer matter, not a matter for other specifications, so somewhat unrelated to this bug. (Constructing Response objects is needed for service workers.)
Comment 3 Anne 2016-08-15 11:18:55 UTC
Someone filed this on GitHub too. It's gotten a little better as well I think and there's other specifications that contain some examples now.

https://github.com/whatwg/fetch/issues/186