-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Response constructor with ReadableStream.
This is an initial proposal for #63.
- Loading branch information
1 parent
c3e058c
commit da665fa
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
... | ||
} | ||
``` |