Skip to content

Conversation

@jgraham
Copy link
Collaborator

@jgraham jgraham commented Sep 17, 2025

Rewrite the fetch-request-streams feature to make it more clear what precise property it covers, and add a new fetch-body-stream feature to cover the body option to the fetch function supporting ReadableStream objects.

@jgraham jgraham requested a review from ddbeck September 17, 2025 11:31
@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Sep 17, 2025
@jgraham
Copy link
Collaborator Author

jgraham commented Sep 22, 2025

Based on web-platform-tests/interop#1072 (comment) another option here is to just move api.Request.Request.request_body_readablestream into Fetch upload streams, although it won't accurately reflect the fact that some Request.body usecases already work in Safari (but not Firefox).

Rewrite the fetch-request-streams feature to make it more clear what
precise property it covers, and add a new fetch-body-stream feature to
cover the `body` option to the `fetch` function supporting
`ReadableStream` objects.
@jgraham
Copy link
Collaborator Author

jgraham commented Sep 30, 2025

OK, I've updated this to just make the more minimal change of requiring that the Request body property feature just requires both that you get a body property on Request and also that you can specify it in the constructor.

I'm not delighted with that, because it obscures the fact that part of the feature is already available in Safari, but it's better than the status quo.

@@ -1,5 +1,6 @@
name: Fetch upload streams
description: A `fetch()` request uploads a stream of data to the server when a request's `body` property is a `ReadableStream` object.
name: Request body property
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing I'm not 100% sure about is the name. Isn't it a problem that we're loosing the "stream" part of it?
According to MDN, the body part of a request can either be null or a stream.
So, really, it's only used for streaming requests to a server, right?

What other things can it be used for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants