-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Body mixin; document Request and Response APIs instead #6455
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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