Remove Body mixin; document Request and Response APIs instead#6455
Remove Body mixin; document Request and Response APIs instead#6455sideshowbarker merged 5 commits intomdn:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
foolip
left a comment
There was a problem hiding this comment.
Looks great! I have some comments but I won't be the one to approve.
| <div>{{APIRef("Fetch")}}</div> | ||
|
|
||
| <p>The <strong><code>arrayBuffer()</code></strong> method of the {{domxref("Request")}} interface | ||
| takes a {{domxref("Request")}} stream and reads it to completion. It returns a promise |
There was a problem hiding this comment.
What does it mean to read a Request to completion? This description makes sense for a Response, but for a Request I'm actually not sure what this method is for. I guess it return data already set for the Request by some other means?
This comment will apply to all of the methods on Request.
More generally, the "takes a" wording here seems pretty unhelpful. While one can do Request.prototype.arrayBuffer.call(myRequest), the this is typically implied and I'd expect this to be misread as there being a Request argument somewhere, which there isn't.
There was a problem hiding this comment.
How about this?
The
arrayBuffer()method of the {{domxref("Request")}} interface reads the request body and returns a promise that resolves with an {{jsxref("ArrayBuffer")}}.
|
well dang — pushed the wrong buttons and merged this prematurely Not sure what’s best to do now, as far as getting the commit suggestions applied. I guess the options are:
|
|
I opened #6468 as the follow-up PR. |
This PR removes https://developer.mozilla.org/en-US/docs/Web/API/Body and documents the mixin as
BCD: mdn/browser-compat-data#10958