- From: Anne van Kesteren <notifications@github.com>
- Date: Thu, 26 Oct 2017 06:36:04 +0000 (UTC)
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/620/review/72089343@github.com>
annevk commented on this pull request.
I think it would be nicer to describe the enums.
> @@ -4860,8 +4860,59 @@ initially a new {{AbortSignal}} object.
<var>init</var>])</code>
<dd>Returns a new <var>request</var> whose {{Request/url}} property is <var>input</var> if
<var>input</var> is a string, and <var>input</var>'s {{Request/url}} if <var>input</var> is a
- {{Request}} object. The optional <var>init</var> argument allows for setting attributes
- appearing in {{RequestInit}} via object members of the same name.
+ {{Request}} object.
+
+ The optional <var>init</var> argument allows for setting properties appearing in {{RequestInit}}
+ via object members of the same name. These are the object members that can be used:
I prefer explicit `<p>` usage.
> @@ -4860,8 +4860,59 @@ initially a new {{AbortSignal}} object.
<var>init</var>])</code>
<dd>Returns a new <var>request</var> whose {{Request/url}} property is <var>input</var> if
<var>input</var> is a string, and <var>input</var>'s {{Request/url}} if <var>input</var> is a
- {{Request}} object. The optional <var>init</var> argument allows for setting attributes
- appearing in {{RequestInit}} via object members of the same name.
+ {{Request}} object.
+
+ The optional <var>init</var> argument allows for setting properties appearing in {{RequestInit}}
+ via object members of the same name. These are the object members that can be used:
+
+ <dl>
+ <dt>{{RequestInit/method}}
+ <dd>Set to a string to set <var>request</var>'s {{Request/method}}.
+
+ <dt>{{RequestInit/headers}}
+ <dd>Set to a {{Headers}} object to set <var>request</var>'s {{Request/headers}}.
This can also be an array of two-item arrays.
> + The optional <var>init</var> argument allows for setting properties appearing in {{RequestInit}}
+ via object members of the same name. These are the object members that can be used:
+
+ <dl>
+ <dt>{{RequestInit/method}}
+ <dd>Set to a string to set <var>request</var>'s {{Request/method}}.
+
+ <dt>{{RequestInit/headers}}
+ <dd>Set to a {{Headers}} object to set <var>request</var>'s {{Request/headers}}.
+
+ <dt>{{RequestInit/body}}
+ <dd>Set to a {{Body}} object or null to set <var>request</var>'s <a>body</a>.
+
+ <dt>{{RequestInit/referrer}}
+ <dd>Set to a string whose value is a same-origin URL or the empty string to set
+ <var>request</var>'s <a>referrer</a>.
You can also set it to `about:client` to use the referrer of the global object.
> + <dd>Set to a <a for=/>referrer policy</a> to set <var>request</var>'s {{Request/referrerPolicy}}.
+
+ <dt>{{RequestInit/mode}}
+ <dd>Set to a string to indicate whether the request will use CORS, or will be restricted to
+ same-origin URLs. Sets <var>request</var>'s {{Request/mode}}.
+
+ <dt>{{RequestInit/credentials}}
+ <dd>Set to a string indicating whether credentials will be sent with the request always, never, or
+ only when sent to a same-origin URL. Sets <var>request</var>'s {{Request/credentials}}.
+
+ <dt>{{RequestInit/cache}}
+ <dd>Set to a string indicating how the request will interact with the browser's cache to set
+ <var>request</var>'s {{Request/cache}}.
+
+ <dt>{{RequestInit/redirect}}
+ <dd>Set to a string indicating whether or not <var>request</var> should automatically follow
follow should not be preceded by two spaces.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/620#pullrequestreview-72089343
Received on Thursday, 26 October 2017 06:36:32 UTC