{"action":"created","comment":{"url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/comments/24311029","id":24311029,"diff_hunk":"@@ -28,54 +32,119 @@ fetch(\"/music/pk/altes-kamuffel.flac\")\n   .catch((e) => console.error(\"something went wrong\", e))\n ```\n \n-## [Bodies] (https://fetch.spec.whatwg.org/#bodies)\n-A body is a byte stream, which means it is a piped pair of readable and writable byte streams. It has an associated ...(the original description follows)\n+## Somewhere in [Infrastructure] (https://fetch.spec.whatwg.org/#infrastructure) section\n \n-The __read end__ of a body is the readable stream of the body. It is of type ReadableByteStream.\n+To construct a ReadableStream with given _start_, _pull_, _enqueue_ and _strategy_ all of which are optional, run these steps.\n \n-The __write end__ of a body is the writable stream of the body. It is of type WritableStream.\n+1. Let _init_ be a new object.\n+1. Set _init_[\"start\"] to _start_ if _start_ is given.\n+1. Set _init_[\"pull\"] to _pull_ if _pull_ is given.\n+1. Set _init_[\"enqueue\"] to _enqueue_ if _enqueue_ is given.\n+1. Set _init_[\"strategy\"] to _strategy_ if _strategy_ is given.\n+1. Let _stream_ be the result of calling the initial value of ReadableStream as constructor with _init_ as an argument. Rethrow any exceptions.\n+1. Return _stream_.\n \n-## [Body mixin](https://fetch.spec.whatwg.org/#body-mixin)\n+To construct a fixed ReadableStream with given _bytes_, run these steps.\n \n-```\n-callback BodyStreamInit = void (WritableStream);\n-typedef (Blob or BufferSource or FormData or URLSearchParams or USVString or BodyStreamInit) BodyInit;\n-```\n+1. Let _enqueue_, _close_ and _error_ be null.\n+1. Let _start_ be a function that sets _enqueue_, _close_ and _error_ to the first three arguments when called.\n+1. Let _stream_ be the result of constructing a ReadableStream with _start_. Rethrow any exceptions.\n+1. Call _enqueue_ with _bytes_. Rethrow any exceptions.\n+1. Call _close_. Rethrow any exceptions.\n+1. Return _stream_.\n+\n+## [Fetching](https://fetch.spec.whatwg.org/#fetching)\n \n-To extract a byte stream and a 'Content-Type' value from a BodyStreamInit object, run these steps:\n+Add the following sentences after \"To perform a __fetch__ using _request, ...\".\n \n-1. Let _stream_ be an empty byte stream.\n-2. Let _Content-Type_ be null.\n-3. Call _object_ with the _write end_ of the body. Rethrow any exception.\n-4. Return _stream_ and _Content-Type_.\n+It is possible to ask the user agent to suspend the ongoing fetch. The user agent may either accept or ignore the request.\n+The suspended fetch can be resumed.\n+\n+## [Body mixin] (https://fetch.spec.whatwg.org/#body-mixin)\n \n ```\n-[NoInterfaceObject] interface Body {\n-    readonly attribute ReadableByteStream body;\n+interface Body {\n+    readonly attribute ReadableStream body;\n     ...\n };\n ```\n-Objects implementing the Body mixin gain an associated __body__ (a pair of readable and writable byte streams) and a __MIME type__ (initially the empty byte sequence).\n \n-The __bodyUsed__ attribute's getter must return if the __read end__ of the body is locked.\n+Objects implementing the Body mixin gain an associated body (initially null), used flag (initially unset), and a MIME type (initially the empty byte sequence).\n \n-The __body__ attribute's getter must return the __read end__ of the body.\n+The body attribute's getter must return body.","path":"README.md","position":73,"original_position":73,"commit_id":"b9bed6b0a71053ed409540a1f4f320549000fc78","original_commit_id":"cc322600436c9a2a5a3d1fded49abbcffd888e08","user":{"login":"tyoshino","id":4511440,"avatar_url":"https://avatars.githubusercontent.com/u/4511440?v=3","gravatar_id":"","url":"https://api.github.com/users/tyoshino","html_url":"https://github.com/tyoshino","followers_url":"https://api.github.com/users/tyoshino/followers","following_url":"https://api.github.com/users/tyoshino/following{/other_user}","gists_url":"https://api.github.com/users/tyoshino/gists{/gist_id}","starred_url":"https://api.github.com/users/tyoshino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyoshino/subscriptions","organizations_url":"https://api.github.com/users/tyoshino/orgs","repos_url":"https://api.github.com/users/tyoshino/repos","events_url":"https://api.github.com/users/tyoshino/events{/privacy}","received_events_url":"https://api.github.com/users/tyoshino/received_events","type":"User","site_admin":false},"body":"return the associated body","created_at":"2015-02-09T06:35:05Z","updated_at":"2015-02-09T06:35:05Z","html_url":"https://github.com/yutakahirano/fetch-with-streams/pull/18#discussion_r24311029","pull_request_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/comments/24311029"},"html":{"href":"https://github.com/yutakahirano/fetch-with-streams/pull/18#discussion_r24311029"},"pull_request":{"href":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/18","id":28658542,"html_url":"https://github.com/yutakahirano/fetch-with-streams/pull/18","diff_url":"https://github.com/yutakahirano/fetch-with-streams/pull/18.diff","patch_url":"https://github.com/yutakahirano/fetch-with-streams/pull/18.patch","issue_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/issues/18","number":18,"state":"open","locked":false,"title":"Readable stream and response","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"body":"I am creating this pull request from @yutakahirano's branch simply so I can leave line comments :). Original issue is #17.","created_at":"2015-02-04T17:41:08Z","updated_at":"2015-02-09T06:35:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bddbd6245d5d0e6c226ef5927dd588ca8128153","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/18/commits","review_comments_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/18/comments","review_comment_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/comments/{number}","comments_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/issues/18/comments","statuses_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/statuses/b9bed6b0a71053ed409540a1f4f320549000fc78","head":{"label":"yutakahirano:readable-stream-and-response","ref":"readable-stream-and-response","sha":"b9bed6b0a71053ed409540a1f4f320549000fc78","user":{"login":"yutakahirano","id":5187874,"avatar_url":"https://avatars.githubusercontent.com/u/5187874?v=3","gravatar_id":"","url":"https://api.github.com/users/yutakahirano","html_url":"https://github.com/yutakahirano","followers_url":"https://api.github.com/users/yutakahirano/followers","following_url":"https://api.github.com/users/yutakahirano/following{/other_user}","gists_url":"https://api.github.com/users/yutakahirano/gists{/gist_id}","starred_url":"https://api.github.com/users/yutakahirano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutakahirano/subscriptions","organizations_url":"https://api.github.com/users/yutakahirano/orgs","repos_url":"https://api.github.com/users/yutakahirano/repos","events_url":"https://api.github.com/users/yutakahirano/events{/privacy}","received_events_url":"https://api.github.com/users/yutakahirano/received_events","type":"User","site_admin":false},"repo":{"id":25508568,"name":"fetch-with-streams","full_name":"yutakahirano/fetch-with-streams","owner":{"login":"yutakahirano","id":5187874,"avatar_url":"https://avatars.githubusercontent.com/u/5187874?v=3","gravatar_id":"","url":"https://api.github.com/users/yutakahirano","html_url":"https://github.com/yutakahirano","followers_url":"https://api.github.com/users/yutakahirano/followers","following_url":"https://api.github.com/users/yutakahirano/following{/other_user}","gists_url":"https://api.github.com/users/yutakahirano/gists{/gist_id}","starred_url":"https://api.github.com/users/yutakahirano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutakahirano/subscriptions","organizations_url":"https://api.github.com/users/yutakahirano/orgs","repos_url":"https://api.github.com/users/yutakahirano/repos","events_url":"https://api.github.com/users/yutakahirano/events{/privacy}","received_events_url":"https://api.github.com/users/yutakahirano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yutakahirano/fetch-with-streams","description":"Fetch API integrated with Streams.","fork":false,"url":"https://api.github.com/repos/yutakahirano/fetch-with-streams","forks_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/forks","keys_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/teams","hooks_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/hooks","issue_events_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/issues/events{/number}","events_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/events","assignees_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/assignees{/user}","branches_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/branches{/branch}","tags_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/tags","blobs_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/git/refs{/sha}","trees_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/statuses/{sha}","languages_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/languages","stargazers_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/stargazers","contributors_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/contributors","subscribers_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/subscribers","subscription_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/subscription","commits_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/commits{/sha}","git_commits_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/git/commits{/sha}","comments_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/comments{/number}","issue_comment_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/issues/comments/{number}","contents_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/contents/{+path}","compare_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/merges","archive_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/downloads","issues_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/issues{/number}","pulls_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls{/number}","milestones_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/milestones{/number}","notifications_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/labels{/name}","releases_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/releases{/id}","created_at":"2014-10-21T07:28:29Z","updated_at":"2015-02-05T15:09:44Z","pushed_at":"2015-02-09T06:26:58Z","git_url":"git://github.com/yutakahirano/fetch-with-streams.git","ssh_url":"git@github.com:yutakahirano/fetch-with-streams.git","clone_url":"https://github.com/yutakahirano/fetch-with-streams.git","svn_url":"https://github.com/yutakahirano/fetch-with-streams","homepage":null,"size":264,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":2,"default_branch":"master"}},"base":{"label":"yutakahirano:master","ref":"master","sha":"171546225997687a98c9fedef3a353557ef7cea3","user":{"login":"yutakahirano","id":5187874,"avatar_url":"https://avatars.githubusercontent.com/u/5187874?v=3","gravatar_id":"","url":"https://api.github.com/users/yutakahirano","html_url":"https://github.com/yutakahirano","followers_url":"https://api.github.com/users/yutakahirano/followers","following_url":"https://api.github.com/users/yutakahirano/following{/other_user}","gists_url":"https://api.github.com/users/yutakahirano/gists{/gist_id}","starred_url":"https://api.github.com/users/yutakahirano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutakahirano/subscriptions","organizations_url":"https://api.github.com/users/yutakahirano/orgs","repos_url":"https://api.github.com/users/yutakahirano/repos","events_url":"https://api.github.com/users/yutakahirano/events{/privacy}","received_events_url":"https://api.github.com/users/yutakahirano/received_events","type":"User","site_admin":false},"repo":{"id":25508568,"name":"fetch-with-streams","full_name":"yutakahirano/fetch-with-streams","owner":{"login":"yutakahirano","id":5187874,"avatar_url":"https://avatars.githubusercontent.com/u/5187874?v=3","gravatar_id":"","url":"https://api.github.com/users/yutakahirano","html_url":"https://github.com/yutakahirano","followers_url":"https://api.github.com/users/yutakahirano/followers","following_url":"https://api.github.com/users/yutakahirano/following{/other_user}","gists_url":"https://api.github.com/users/yutakahirano/gists{/gist_id}","starred_url":"https://api.github.com/users/yutakahirano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutakahirano/subscriptions","organizations_url":"https://api.github.com/users/yutakahirano/orgs","repos_url":"https://api.github.com/users/yutakahirano/repos","events_url":"https://api.github.com/users/yutakahirano/events{/privacy}","received_events_url":"https://api.github.com/users/yutakahirano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yutakahirano/fetch-with-streams","description":"Fetch API integrated with Streams.","fork":false,"url":"https://api.github.com/repos/yutakahirano/fetch-with-streams","forks_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/forks","keys_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/teams","hooks_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/hooks","issue_events_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/issues/events{/number}","events_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/events","assignees_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/assignees{/user}","branches_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/branches{/branch}","tags_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/tags","blobs_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/git/refs{/sha}","trees_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/statuses/{sha}","languages_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/languages","stargazers_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/stargazers","contributors_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/contributors","subscribers_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/subscribers","subscription_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/subscription","commits_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/commits{/sha}","git_commits_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/git/commits{/sha}","comments_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/comments{/number}","issue_comment_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/issues/comments/{number}","contents_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/contents/{+path}","compare_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/merges","archive_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/downloads","issues_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/issues{/number}","pulls_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls{/number}","milestones_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/milestones{/number}","notifications_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/labels{/name}","releases_url":"https://api.github.com/repos/yutakahirano/fetch-with-streams/releases{/id}","created_at":"2014-10-21T07:28:29Z","updated_at":"2015-02-05T15:09:44Z","pushed_at":"2015-02-09T06:26:58Z","git_url":"git://github.com/yutakahirano/fetch-with-streams.git","ssh_url":"git@github.com:yutakahirano/fetch-with-streams.git","clone_url":"https://github.com/yutakahirano/fetch-with-streams.git","svn_url":"https://github.com/yutakahirano/fetch-with-streams","homepage":null,"size":264,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/18"},"html":{"href":"https://github.com/yutakahirano/fetch-with-streams/pull/18"},"issue":{"href":"https://api.github.com/repos/yutakahirano/fetch-with-streams/issues/18"},"comments":{"href":"https://api.github.com/repos/yutakahirano/fetch-with-streams/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/yutakahirano/fetch-with-streams/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/yutakahirano/fetch-with-streams/statuses/b9bed6b0a71053ed409540a1f4f320549000fc78"}}}}