Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch() upload streaming #434

Closed
3 of 5 tasks
yoichio opened this issue Oct 28, 2019 · 7 comments
Closed
3 of 5 tasks

fetch() upload streaming #434

yoichio opened this issue Oct 28, 2019 · 7 comments
Assignees
Labels

Comments

@yoichio
Copy link

yoichio commented Oct 28, 2019

Hello TAG!

I'm requesting a TAG review of:

Further details:

We'd prefer the TAG provide feedback as (please select one):

  • open issues in our GitHub repo for each point of feedback
  • open a single issue in our GitHub repo for the entire review
  • leave review feedback as a comment in this issue and @yoichio, @yutakahirano
@torgo torgo added Venue: WHATWG Topic: Streams Any kind of stream-like feature and removed Progress: untriaged labels Nov 5, 2019
@torgo torgo added this to the 2019-11-19-telecon milestone Nov 5, 2019
@torgo
Copy link
Member

torgo commented Nov 5, 2019

Hi @yoichio thanks for this - is there an explainer that we can look at?

@yoichio
Copy link
Author

yoichio commented Nov 6, 2019

No explainer for this.

Here is brief description why we want to implement this:

  • Web author will be able to upload streaming data - possibly generated by devices, media, and so on.
    Some web clients want to talk to a streaming end-point directly without any intermediary translation.
    Traditionally, uploading streaming data was implemented on WebSocket but it has made client/server code messy. Fetch upload streaming makes that simpler.

Code sample:

const stream = new ReadableStream({start: controller => {
    controller.enqueue("f");
    controller.enqueue("bar");
    controller.close();
}});

let response = await fetch("http://example.com/", {method:"POST", body: stream});
let text = await response.text();
console.log(`Server responded "${text}"`);

@annevk
Copy link
Member

annevk commented Nov 6, 2019

I wonder if it might be a bit early to ask for review. There's a number of open issues that need to be addressed, right? https://github.com/whatwg/fetch/labels/topic%3A%20streams

whatwg/fetch#538 in particular seems concerning and without a good conclusion, though I haven't reviewed all in detail.

@yoichio
Copy link
Author

yoichio commented Nov 7, 2019

Ping @yutakahirano and @domenic ?

@yutakahirano
Copy link

Thank you. I think not all of them are blocking, so I created a new label "upload-streaming-blocking", labeled whatwg/fetch#538.

https://github.com/whatwg/fetch/labels/upload-streaming-blocking

@torgo
Copy link
Member

torgo commented Nov 19, 2019

Ok we are happy to do a review but please confirm back to us that things are ready? Until then I'm going to close.

@torgo torgo closed this as completed Nov 19, 2019
@annevk
Copy link
Member

annevk commented Nov 20, 2019

@torgo FWIW, I think we're in a better state now with those issues and whatwg/fetch#966 might be of interest to the TAG at some level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants
@torgo @ylafon @annevk @hadleybeeman @yutakahirano @yoichio and others