Skip to content

Commit

Permalink
Response constructor with ReadableStream.
Browse files Browse the repository at this point in the history
This is an initial proposal for #63.
  • Loading branch information
yutakahirano committed Dec 2, 2015
1 parent c3e058c commit da665fa
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions response-stream-constructor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
__ASSUME [body-readable-stream.md](body-readable-stream.md) is applied to [the fetch spec](https://fetch.spec.whatwg.org/).__

## [Body mixin](https://fetch.spec.whatwg.org/#response-class) ##

To _extract_ a body and a \`Content-Type\` value from _object_, run these steps:

1. (Same)
1. (Same)
1. Switch on _object_'s type:
- ReadableStream => Set _stream_ to _object_.
- (The original algorithm follows...)

## [Response class](https://fetch.spec.whatwg.org/#response-class) ##

```
typedef (Blob or BufferSource or FormData or URLSearchParams or USVString or ReadableStream) ResponseBodyInit;
[Construct(ResponseBodyInit, option ResponseIniit init), Exposed=(Window,Worker)]
interface Response {
...
}
```

0 comments on commit da665fa

Please sign in to comment.