Skip to content

[browser][wasm] Request Streaming upload via http handler #36634

@kjpou1

Description

@kjpou1

During the initial review of the browser wasm code integration it was brought to the attention that the request content may not be sufficient in its current state.

There needs to be more investigation into whether there is a way to stream the request content. The issue being that not being able to handle this scenario may result in the buffering of huge amounts of data is some scenarios.

These scenarios need to be identified and solution coded if there is a way to achieve this using the browser API.

Initial investigation leads to some sort of wrapping the javascript Streams API and exposing it in some way via .NET stream.

Model being:

fetch('/', {
  method: 'POST', 
  body: new ReadableStream({
    pull: function(controller) {
      console.log('pull called!');
      controller.enqueue('Some data...');
    }
  })
});

Right now this does not seem to work as per the discussion here: whatwg/fetch#425 (comment)

As well as multiple issues outstanding.

Also to keep in mind the streaming API is still marked experimental in the documentation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions