Skip to content

Remove Body mixin; document Request and Response APIs instead#6455

Merged
sideshowbarker merged 5 commits intomdn:mainfrom
Elchi3:demix-body
Jun 30, 2021
Merged

Remove Body mixin; document Request and Response APIs instead#6455
sideshowbarker merged 5 commits intomdn:mainfrom
Elchi3:demix-body

Conversation

@Elchi3
Copy link
Member

@Elchi3 Elchi3 commented Jun 29, 2021

@Elchi3 Elchi3 requested review from a team as code owners June 29, 2021 14:41
@Elchi3 Elchi3 requested a review from a team June 29, 2021 14:41
@Elchi3 Elchi3 requested review from a team as code owners June 29, 2021 14:41
@Elchi3 Elchi3 requested review from Rumyra and removed request for a team June 29, 2021 14:41
@github-actions

This comment has been minimized.

Copy link
Contributor

@foolip foolip left a 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
Copy link
Contributor

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.

Copy link
Member Author

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")}}.

@sideshowbarker sideshowbarker merged commit 29af89a into mdn:main Jun 30, 2021
@sideshowbarker
Copy link
Member

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:

  • A. Revert the commit, and raise a new PR, and re-start the review.
  • B. Don’t revert the commit, but just a raise a new PR, with the commit suggestions applied, and then I guess with the other review comments re-raised there.

@Elchi3 Elchi3 deleted the demix-body branch June 30, 2021 07:39
@Elchi3
Copy link
Member Author

Elchi3 commented Jun 30, 2021

I opened #6468 as the follow-up PR.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants