{"action":"created","comment":{"url":"https://api.github.com/repos/whatwg/fetch/pulls/comments/51513734","id":51513734,"diff_hunk":"@@ -3535,6 +3617,35 @@ <h4 id=\"should-response-to-request-be-blocked-due-to-nosniff?\"><dfn title=\"shoul\n  <var>bytes</var>.\n </dl>\n \n+<p>Objects implementing the <code>Body</code> mixin also have an associated\n+<dfn title=concept-Body-consume-body>consume body</dfn> algorithm, which given a <var>type</var>,\n+runs these steps:\n+\n+<ol>\n+ <li><p>If this object is <span title=concept-Body-disturbed>disturbed</span>\n+ or <span title=concept-Body-locked>locked</span>, return a new promise rejected with a\n+ <code>TypeError</code>.\n+\n+ <li><p>Let <var>stream</var> be <span title=concept-Body-body>body</span>'s\n+ <span title=concept-body-stream>stream</span> if <span title=concept-Body-body>body</span> is\n+ non-null, or an <span title=concept-empty-ReadableStream>empty</span>\n+ <code title=concept-ReadableStream>ReadableStream</code> object otherwise.\n+\n+ <li><p>Let <var>reader</var> be the result of <span title=concept-get-reader>getting</span>\n+ a reader from <var>stream</var>. If that threw an exception, return a new promise rejected\n+ with that exception.\n+\n+ <li><p>Let <var>promise</var> be the result of\n+ <span title=concept-read-all-bytes-from-ReadableStream>reading</span> all bytes from\n+ <var>stream</var> with <var>reader</var>.\n+\n+ <li><p>Return the result of transforming <var>promise</var> by a fulfillment handler that\n+ returns the result of the <span title=concept-body-package-data>package data</span> algorithm\n+ with its first argument, <var>type</var> and <span title=concept-body-mime-type>MIME type</span>.","path":"Overview.src.html","position":null,"original_position":502,"commit_id":"b924be8ae056ea96a14a18eca91bb9883cd238f1","original_commit_id":"5b90955f282c2a8cc07658c28dbb6908b2d7befe","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},"body":"Fixed as \"this object's MIME type\".","created_at":"2016-02-02T02:13:28Z","updated_at":"2016-02-02T02:13:28Z","html_url":"https://github.com/whatwg/fetch/pull/200#discussion_r51513734","pull_request_url":"https://api.github.com/repos/whatwg/fetch/pulls/200","_links":{"self":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/comments/51513734"},"html":{"href":"https://github.com/whatwg/fetch/pull/200#discussion_r51513734"},"pull_request":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/200"}}},"pull_request":{"url":"https://api.github.com/repos/whatwg/fetch/pulls/200","id":56713477,"html_url":"https://github.com/whatwg/fetch/pull/200","diff_url":"https://github.com/whatwg/fetch/pull/200.diff","patch_url":"https://github.com/whatwg/fetch/pull/200.patch","issue_url":"https://api.github.com/repos/whatwg/fetch/issues/200","number":200,"state":"open","locked":false,"title":"Replace byte stream with ReadableStream.","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},"body":"This change replaces byte streams used in request and response with ReadableStream. This change\r\nalso unifies some properties and operations which was defined separately in Request and Response\r\nclasses.\r\n\r\nThe change is based on\r\nhttps://github.com/yutakahirano/fetch-with-streams/blob/master/body-readable-stream.md.\r\nDepending specs need to be changed as well.","created_at":"2016-01-21T07:23:40Z","updated_at":"2016-02-02T02:13:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7f3df4183888491b57d7e341e759cf832ee3a47","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/whatwg/fetch/pulls/200/commits","review_comments_url":"https://api.github.com/repos/whatwg/fetch/pulls/200/comments","review_comment_url":"https://api.github.com/repos/whatwg/fetch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/whatwg/fetch/issues/200/comments","statuses_url":"https://api.github.com/repos/whatwg/fetch/statuses/b924be8ae056ea96a14a18eca91bb9883cd238f1","head":{"label":"whatwg:body-stream-refactoring","ref":"body-stream-refactoring","sha":"b924be8ae056ea96a14a18eca91bb9883cd238f1","user":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars.githubusercontent.com/u/2226336?v=3","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"repo":{"id":5777189,"name":"fetch","full_name":"whatwg/fetch","owner":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars.githubusercontent.com/u/2226336?v=3","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/whatwg/fetch","description":"Fetch Standard","fork":false,"url":"https://api.github.com/repos/whatwg/fetch","forks_url":"https://api.github.com/repos/whatwg/fetch/forks","keys_url":"https://api.github.com/repos/whatwg/fetch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whatwg/fetch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whatwg/fetch/teams","hooks_url":"https://api.github.com/repos/whatwg/fetch/hooks","issue_events_url":"https://api.github.com/repos/whatwg/fetch/issues/events{/number}","events_url":"https://api.github.com/repos/whatwg/fetch/events","assignees_url":"https://api.github.com/repos/whatwg/fetch/assignees{/user}","branches_url":"https://api.github.com/repos/whatwg/fetch/branches{/branch}","tags_url":"https://api.github.com/repos/whatwg/fetch/tags","blobs_url":"https://api.github.com/repos/whatwg/fetch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whatwg/fetch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whatwg/fetch/git/refs{/sha}","trees_url":"https://api.github.com/repos/whatwg/fetch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whatwg/fetch/statuses/{sha}","languages_url":"https://api.github.com/repos/whatwg/fetch/languages","stargazers_url":"https://api.github.com/repos/whatwg/fetch/stargazers","contributors_url":"https://api.github.com/repos/whatwg/fetch/contributors","subscribers_url":"https://api.github.com/repos/whatwg/fetch/subscribers","subscription_url":"https://api.github.com/repos/whatwg/fetch/subscription","commits_url":"https://api.github.com/repos/whatwg/fetch/commits{/sha}","git_commits_url":"https://api.github.com/repos/whatwg/fetch/git/commits{/sha}","comments_url":"https://api.github.com/repos/whatwg/fetch/comments{/number}","issue_comment_url":"https://api.github.com/repos/whatwg/fetch/issues/comments{/number}","contents_url":"https://api.github.com/repos/whatwg/fetch/contents/{+path}","compare_url":"https://api.github.com/repos/whatwg/fetch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whatwg/fetch/merges","archive_url":"https://api.github.com/repos/whatwg/fetch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whatwg/fetch/downloads","issues_url":"https://api.github.com/repos/whatwg/fetch/issues{/number}","pulls_url":"https://api.github.com/repos/whatwg/fetch/pulls{/number}","milestones_url":"https://api.github.com/repos/whatwg/fetch/milestones{/number}","notifications_url":"https://api.github.com/repos/whatwg/fetch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whatwg/fetch/labels{/name}","releases_url":"https://api.github.com/repos/whatwg/fetch/releases{/id}","deployments_url":"https://api.github.com/repos/whatwg/fetch/deployments","created_at":"2012-09-12T08:39:20Z","updated_at":"2016-02-01T05:14:59Z","pushed_at":"2016-02-02T02:02:01Z","git_url":"git://github.com/whatwg/fetch.git","ssh_url":"git@github.com:whatwg/fetch.git","clone_url":"https://github.com/whatwg/fetch.git","svn_url":"https://github.com/whatwg/fetch","homepage":"https://fetch.spec.whatwg.org/","size":4103,"stargazers_count":222,"watchers_count":222,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":45,"forks":30,"open_issues":45,"watchers":222,"default_branch":"master"}},"base":{"label":"whatwg:master","ref":"master","sha":"010dd7ad85d9bb893c7bbb03e2cbb800068da18e","user":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars.githubusercontent.com/u/2226336?v=3","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"repo":{"id":5777189,"name":"fetch","full_name":"whatwg/fetch","owner":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars.githubusercontent.com/u/2226336?v=3","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/whatwg/fetch","description":"Fetch Standard","fork":false,"url":"https://api.github.com/repos/whatwg/fetch","forks_url":"https://api.github.com/repos/whatwg/fetch/forks","keys_url":"https://api.github.com/repos/whatwg/fetch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whatwg/fetch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whatwg/fetch/teams","hooks_url":"https://api.github.com/repos/whatwg/fetch/hooks","issue_events_url":"https://api.github.com/repos/whatwg/fetch/issues/events{/number}","events_url":"https://api.github.com/repos/whatwg/fetch/events","assignees_url":"https://api.github.com/repos/whatwg/fetch/assignees{/user}","branches_url":"https://api.github.com/repos/whatwg/fetch/branches{/branch}","tags_url":"https://api.github.com/repos/whatwg/fetch/tags","blobs_url":"https://api.github.com/repos/whatwg/fetch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whatwg/fetch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whatwg/fetch/git/refs{/sha}","trees_url":"https://api.github.com/repos/whatwg/fetch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whatwg/fetch/statuses/{sha}","languages_url":"https://api.github.com/repos/whatwg/fetch/languages","stargazers_url":"https://api.github.com/repos/whatwg/fetch/stargazers","contributors_url":"https://api.github.com/repos/whatwg/fetch/contributors","subscribers_url":"https://api.github.com/repos/whatwg/fetch/subscribers","subscription_url":"https://api.github.com/repos/whatwg/fetch/subscription","commits_url":"https://api.github.com/repos/whatwg/fetch/commits{/sha}","git_commits_url":"https://api.github.com/repos/whatwg/fetch/git/commits{/sha}","comments_url":"https://api.github.com/repos/whatwg/fetch/comments{/number}","issue_comment_url":"https://api.github.com/repos/whatwg/fetch/issues/comments{/number}","contents_url":"https://api.github.com/repos/whatwg/fetch/contents/{+path}","compare_url":"https://api.github.com/repos/whatwg/fetch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whatwg/fetch/merges","archive_url":"https://api.github.com/repos/whatwg/fetch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whatwg/fetch/downloads","issues_url":"https://api.github.com/repos/whatwg/fetch/issues{/number}","pulls_url":"https://api.github.com/repos/whatwg/fetch/pulls{/number}","milestones_url":"https://api.github.com/repos/whatwg/fetch/milestones{/number}","notifications_url":"https://api.github.com/repos/whatwg/fetch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whatwg/fetch/labels{/name}","releases_url":"https://api.github.com/repos/whatwg/fetch/releases{/id}","deployments_url":"https://api.github.com/repos/whatwg/fetch/deployments","created_at":"2012-09-12T08:39:20Z","updated_at":"2016-02-01T05:14:59Z","pushed_at":"2016-02-02T02:02:01Z","git_url":"git://github.com/whatwg/fetch.git","ssh_url":"git@github.com:whatwg/fetch.git","clone_url":"https://github.com/whatwg/fetch.git","svn_url":"https://github.com/whatwg/fetch","homepage":"https://fetch.spec.whatwg.org/","size":4103,"stargazers_count":222,"watchers_count":222,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":45,"forks":30,"open_issues":45,"watchers":222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/200"},"html":{"href":"https://github.com/whatwg/fetch/pull/200"},"issue":{"href":"https://api.github.com/repos/whatwg/fetch/issues/200"},"comments":{"href":"https://api.github.com/repos/whatwg/fetch/issues/200/comments"},"review_comments":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/200/comments"},"review_comment":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/200/commits"},"statuses":{"href":"https://api.github.com/repos/whatwg/fetch/statuses/b924be8ae056ea96a14a18eca91bb9883cd238f1"}}}}