Skip to content

Spec update: response.body now returns readable byte stream #24453

Closed
@saschanaz

Description

@saschanaz

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Response/body

What specific section or headline is this issue about?

Value?

What information was incorrect, unhelpful, or incomplete?

No mention about what stream type Response.body returns.

What did you expect to see?

It would be helpful to show it returns readable byte stream and thus one can also call .getReader({ mode: "byob" }) instead of .getReader() to get the bytes from Response.

Do you have any supporting links, references, or citations?

We are updating the spec here: whatwg/fetch#1593

Do you have anything more you want to share?

Check whether this is supported on each browser by running new Response("").body.getReader({ mode: "byob" }). It will throw when not supported.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions