{"action":"created","issue":{"url":"https://api.github.com/repos/whatwg/fetch/issues/103","labels_url":"https://api.github.com/repos/whatwg/fetch/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/fetch/issues/103/comments","events_url":"https://api.github.com/repos/whatwg/fetch/issues/103/events","html_url":"https://github.com/whatwg/fetch/issues/103","id":99169868,"number":103,"title":"Option to require response.ok","user":{"login":"jakearchibald","id":93594,"avatar_url":"https://avatars.githubusercontent.com/u/93594?v=3","gravatar_id":"","url":"https://api.github.com/users/jakearchibald","html_url":"https://github.com/jakearchibald","followers_url":"https://api.github.com/users/jakearchibald/followers","following_url":"https://api.github.com/users/jakearchibald/following{/other_user}","gists_url":"https://api.github.com/users/jakearchibald/gists{/gist_id}","starred_url":"https://api.github.com/users/jakearchibald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakearchibald/subscriptions","organizations_url":"https://api.github.com/users/jakearchibald/orgs","repos_url":"https://api.github.com/users/jakearchibald/repos","events_url":"https://api.github.com/users/jakearchibald/events{/privacy}","received_events_url":"https://api.github.com/users/jakearchibald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-08-05T10:00:51Z","updated_at":"2015-08-10T15:56:58Z","closed_at":null,"body":"Something like:\r\n\r\n```js\r\nfetch(url, {\r\n  requiredStatus: 'ok'\r\n})\r\n```\r\n\r\n…which would cause `fetch` to reject if `response.ok` is false. Default value would be `any`. It could be a boolean, but a value like this means we could let the developer require a specific status code.\r\n\r\nThis would always reject with no-cors requests to avoid x-origin leakage."},"comment":{"url":"https://api.github.com/repos/whatwg/fetch/issues/comments/129505626","html_url":"https://github.com/whatwg/fetch/issues/103#issuecomment-129505626","issue_url":"https://api.github.com/repos/whatwg/fetch/issues/103","id":129505626,"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},"created_at":"2015-08-10T15:56:58Z","updated_at":"2015-08-10T15:56:58Z","body":"I'm not. Everything from then onward seems to be talking about breaking down responses into two categories: those that are OK and those that are not OK. That's the primitive. Everything on top of that is sugar."}}