A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on IRC (such as one of these permanent autoconfirmed members).

Difference between revisions of "Fetch"

From WHATWG Wiki
Jump to: navigation, search
m (add context)
(add some stuff on the model)
Line 5: Line 5:
 
* Define HTTP context for data: URLs, about:blank, and file: URLs.
 
* Define HTTP context for data: URLs, about:blank, and file: URLs.
 
* Progress Events
 
* Progress Events
 +
 +
== Model ==
 +
 +
The basic model is Request -> Fetch -> Response.
 +
 +
=== Request ===
 +
 +
* URL (as object)
 +
* method
 +
* UA headers
 +
* author headers (maybe rename because people get upset with "author")
 +
* entity body
 +
* origin
 +
* manual redirect flag
 +
* omit credentials flag
 +
* force preflight flag (set for upload progress notifications (to not reveal existence of server in case of POST I suppose; I should know...))
 +
 +
XXX add CORS modes and whatever HTML fetch defines.
 +
 +
=== Fetch ===
 +
 +
Have a case-switch on URL scheme. See also [[URL]]. Fetch results in a network error response unless the scheme is one of
 +
 +
* http
 +
* https
 +
* ftp
 +
* file
 +
* about
 +
* data
 +
* blob
 +
 +
CORS stuff is only relevant for http/https. Can be relevant even for same-origin requests in case of cross-origin redirect without the manual redirect flag set.
 +
 +
XXX ...
 +
 +
=== Response ===
 +
 +
Both intermediate updates (progress, headers received, ...) and final. Also indicates network error / CORS error (exposed as network error), ...
 +
  
 
[[Category:Spec coordination]]
 
[[Category:Spec coordination]]

Revision as of 10:39, 11 February 2013

Fetch is fetch.spec.whatwg.org and will define HTML fetch and CORS as a set of coherent algorithms rather than the intertwined mess we have now. It will also deal with the following:

  • Deal with authentication (URLs containing username/password, servers responding with 401)
  • Deal with URL processing
  • Define HTTP context for data: URLs, about:blank, and file: URLs.
  • Progress Events

Model

The basic model is Request -> Fetch -> Response.

Request

  • URL (as object)
  • method
  • UA headers
  • author headers (maybe rename because people get upset with "author")
  • entity body
  • origin
  • manual redirect flag
  • omit credentials flag
  • force preflight flag (set for upload progress notifications (to not reveal existence of server in case of POST I suppose; I should know...))

XXX add CORS modes and whatever HTML fetch defines.

Fetch

Have a case-switch on URL scheme. See also URL. Fetch results in a network error response unless the scheme is one of

  • http
  • https
  • ftp
  • file
  • about
  • data
  • blob

CORS stuff is only relevant for http/https. Can be relevant even for same-origin requests in case of cross-origin redirect without the manual redirect flag set.

XXX ...

Response

Both intermediate updates (progress, headers received, ...) and final. Also indicates network error / CORS error (exposed as network error), ...