{"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":7,"created_at":"2015-08-05T10:00:51Z","updated_at":"2015-08-06T06:50:02Z","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/128270072","html_url":"https://github.com/whatwg/fetch/issues/103#issuecomment-128270072","issue_url":"https://api.github.com/repos/whatwg/fetch/issues/103","id":128270072,"user":{"login":"annevk","id":1544111,"avatar_url":"https://avatars.githubusercontent.com/u/1544111?v=3","gravatar_id":"","url":"https://api.github.com/users/annevk","html_url":"https://github.com/annevk","followers_url":"https://api.github.com/users/annevk/followers","following_url":"https://api.github.com/users/annevk/following{/other_user}","gists_url":"https://api.github.com/users/annevk/gists{/gist_id}","starred_url":"https://api.github.com/users/annevk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annevk/subscriptions","organizations_url":"https://api.github.com/users/annevk/orgs","repos_url":"https://api.github.com/users/annevk/repos","events_url":"https://api.github.com/users/annevk/events{/privacy}","received_events_url":"https://api.github.com/users/annevk/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T06:50:02Z","updated_at":"2015-08-06T06:50:02Z","body":"IMO, since `Request` is used for both cache and network operations, we should try to keep their semantics in sync, even when it's a somewhat trivial feature for either network or cache."}}