{"action":"created","issue":{"url":"https://api.github.com/repos/matthew-andrews/isomorphic-fetch/issues/122","repository_url":"https://api.github.com/repos/matthew-andrews/isomorphic-fetch","labels_url":"https://api.github.com/repos/matthew-andrews/isomorphic-fetch/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/matthew-andrews/isomorphic-fetch/issues/122/comments","events_url":"https://api.github.com/repos/matthew-andrews/isomorphic-fetch/issues/122/events","html_url":"https://github.com/matthew-andrews/isomorphic-fetch/issues/122","id":207195868,"number":122,"title":"Cannot set header in SPA?","user":{"login":"tronghiep92","id":4768095,"avatar_url":"https://avatars.githubusercontent.com/u/4768095?v=3","gravatar_id":"","url":"https://api.github.com/users/tronghiep92","html_url":"https://github.com/tronghiep92","followers_url":"https://api.github.com/users/tronghiep92/followers","following_url":"https://api.github.com/users/tronghiep92/following{/other_user}","gists_url":"https://api.github.com/users/tronghiep92/gists{/gist_id}","starred_url":"https://api.github.com/users/tronghiep92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tronghiep92/subscriptions","organizations_url":"https://api.github.com/users/tronghiep92/orgs","repos_url":"https://api.github.com/users/tronghiep92/repos","events_url":"https://api.github.com/users/tronghiep92/events{/privacy}","received_events_url":"https://api.github.com/users/tronghiep92/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-13T11:54:54Z","updated_at":"2017-02-23T07:36:39Z","closed_at":null,"body":"Hi all,\r\nI have a code example:\r\n```\r\nfetch(URL, {\r\n    'GET',\r\n    body: JSON.stringify(data),\r\n    headers: {\r\n      'Content-Type': 'application/json',\r\n      'Foobaz': 1234567\r\n    },\r\n  })\r\n```\r\n\r\nWith app SPA, I cannot get my header.\r\n\r\nPlease help, thanks!!!!!\r\n\r\n![error](https://cloud.githubusercontent.com/assets/4768095/22882436/9d48c2dc-f21d-11e6-83a6-a1e0c0f7e95c.png)\r\n"},"comment":{"url":"https://api.github.com/repos/matthew-andrews/isomorphic-fetch/issues/comments/281917571","html_url":"https://github.com/matthew-andrews/isomorphic-fetch/issues/122#issuecomment-281917571","issue_url":"https://api.github.com/repos/matthew-andrews/isomorphic-fetch/issues/122","id":281917571,"user":{"login":"lmj0011","id":9396189,"avatar_url":"https://avatars.githubusercontent.com/u/9396189?v=3","gravatar_id":"","url":"https://api.github.com/users/lmj0011","html_url":"https://github.com/lmj0011","followers_url":"https://api.github.com/users/lmj0011/followers","following_url":"https://api.github.com/users/lmj0011/following{/other_user}","gists_url":"https://api.github.com/users/lmj0011/gists{/gist_id}","starred_url":"https://api.github.com/users/lmj0011/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmj0011/subscriptions","organizations_url":"https://api.github.com/users/lmj0011/orgs","repos_url":"https://api.github.com/users/lmj0011/repos","events_url":"https://api.github.com/users/lmj0011/events{/privacy}","received_events_url":"https://api.github.com/users/lmj0011/received_events","type":"User","site_admin":false},"created_at":"2017-02-23T07:36:39Z","updated_at":"2017-02-23T07:36:39Z","body":"maybe try making the `Foobaz` value a string\r\n\r\nalso change your method to `POST` if you're sending a body\r\nGET passes data in the form of a query string (eg. `foo=2&bar=2`)\r\n\r\n```js\r\nfetch(URL, {\r\n    'GET',\r\n    body: JSON.stringify(data),  // <---  GET doesn't have a body, has to be a query string\r\n    headers: {\r\n      'Content-Type': 'application/json',\r\n      'Foobaz': '1234567'  // <---  1234567 to '1234567'\r\n    },\r\n  })\r\n```"}}
{"actor":{"display_login":"lmj0011"}}