- From: Domenic Denicola <notifications@github.com>
- Date: Mon, 18 Dec 2017 15:50:33 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/620/review/84305899@github.com>
domenic requested changes on this pull request.
Found a few things.
Like you, I'm fairly torn on whether to link to the corresponding public APIs or the internal concepts. I could go either way.
> @@ -4903,8 +4951,60 @@ 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.
+
+ <p>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:</p>
+
+ <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 or an array of two-item arrays to set <var>request</var>'s
"a Headers object, an object literal, or an array of two-item arrays"
> - appearing in {{RequestInit}} via object members of the same name.
+ {{Request}} object.
+
+ <p>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:</p>
+
+ <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 or an array of two-item arrays 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>.
Not quite correct. It's actually a BodyInit. Either link to BodyInit, or maybe spell out what a BodyInit is.
> @@ -4903,8 +4951,60 @@ 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.
+
+ <p>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:</p>
+
+ <dl>
+ <dt>{{RequestInit/method}}
+ <dd>Set to a string to set <var>request</var>'s {{Request/method}}.
Maybe omit "Set to" in all of these?
> +
+ <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
+ redirects, result in an error, or manually follow redirects. Sets <var>request</var>'s
+ {{Request/redirect}}.
+
+ <dt>{{RequestInit/integrity}}
+ <dd>Set to a cryptographic has of the resource to be fetched by <var>request</var>. Sets
s/has/hash
> + <dd>Set to a string indicating whether or not <var>request</var> should automatically follow
+ redirects, result in an error, or manually follow redirects. Sets <var>request</var>'s
+ {{Request/redirect}}.
+
+ <dt>{{RequestInit/integrity}}
+ <dd>Set to a cryptographic has of the resource to be fetched by <var>request</var>. Sets
+ <var>request</var>'s {{Request/integrity}}.
+
+ <dt>{{RequestInit/keepalive}}
+ <dd>Set to a boolean to set <var>request</var>'s {{Request/keepalive}}.
+
+ <dt>{{RequestInit/signal}}
+ <dd>Set to an {{AbortSignal}} to set <var>request</var>'s {{Request/signal}}.
+
+ <dt>{{RequestInit/window}}
+ <dd>Can only be null. Used to set <var>request</var>'s internal <a>window</a> object to
Not an object. I'd maybe say "Used to de-associate the request from any {{Window}}"?
--
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-84305899
Received on Monday, 18 December 2017 23:51:00 UTC