yutakahirano / fetch-with-streams

Fetch API integrated with Streams.
66 stars 8 forks source link

Specify Fetch function more specifically #17

Closed yutakahirano closed 9 years ago

yutakahirano commented 9 years ago

@tyoshino, as we talked locally, I would like to specify fetch function with streams more specifically. And as a first step, I want to specify Readable[Byte]Stream side. I created a branch: https://github.com/yutakahirano/fetch-with-streams/tree/readable-stream-and-response. I dropped WritableStream things from the draft and tried to describe detailed fetch function behavior.

One obvious defect is that I used ReadableByteStream in the draft but they are in fact ReadableStream. I'm not sure ReadableByteStream's interface (includes notifyReady and error functions) are stable enough, and there is no locking mechanism for it.

Can you take a look at it?