whatwg / fetch

Fetch Standard
https://fetch.spec.whatwg.org/
Other
2.12k stars 333 forks source link

Use internalResponse at end of fetch handover #1645

Closed noamr closed 1 year ago

noamr commented 1 year ago

This ensures that callers of processResponseEndOfBody and processResponseConsumeBody would receive the correct body and response without additional steps.

Closes #1512

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

noamr commented 1 year ago

This looks mostly okay, except for some editorial work. Also, we should update the warning (as per #1512 (comment)) to indicate you might get bytes back from an opaque response and thus you have to tread carefully when not using CORS.

Regarding the comment, I want to see where we're going with https://github.com/whatwg/fetch/pull/1614 before I create a merge conflict in the how-to-fetch section... WDYT?

annevk commented 1 year ago

Fair, I've taken a pass at that PR and will try to do a pass at least daily until it's done.

annevk commented 1 year ago

It has landed. This should now be safe to rebase and then you can add the relevant text.

noamr commented 1 year ago

It has landed. This should now be safe to rebase and then you can add the relevant text.

Thanks! On it

noamr commented 1 year ago

It has landed. This should now be safe to rebase and then you can add the relevant text.

Done, please take a look if this warning is what you had in mind.