{"action":"created","issue":{"url":"https://api.github.com/repos/wheresrhys/fetch-mock/issues/63","labels_url":"https://api.github.com/repos/wheresrhys/fetch-mock/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/wheresrhys/fetch-mock/issues/63/comments","events_url":"https://api.github.com/repos/wheresrhys/fetch-mock/issues/63/events","html_url":"https://github.com/wheresrhys/fetch-mock/pull/63","id":129023006,"number":63,"title":"Add type param to make json stringification opt-in","user":{"login":"danny-andrews","id":14965732,"avatar_url":"https://avatars.githubusercontent.com/u/14965732?v=3","gravatar_id":"","url":"https://api.github.com/users/danny-andrews","html_url":"https://github.com/danny-andrews","followers_url":"https://api.github.com/users/danny-andrews/followers","following_url":"https://api.github.com/users/danny-andrews/following{/other_user}","gists_url":"https://api.github.com/users/danny-andrews/gists{/gist_id}","starred_url":"https://api.github.com/users/danny-andrews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danny-andrews/subscriptions","organizations_url":"https://api.github.com/users/danny-andrews/orgs","repos_url":"https://api.github.com/users/danny-andrews/repos","events_url":"https://api.github.com/users/danny-andrews/events{/privacy}","received_events_url":"https://api.github.com/users/danny-andrews/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-27T04:01:29Z","updated_at":"2016-01-28T19:08:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wheresrhys/fetch-mock/pulls/63","html_url":"https://github.com/wheresrhys/fetch-mock/pull/63","diff_url":"https://github.com/wheresrhys/fetch-mock/pull/63.diff","patch_url":"https://github.com/wheresrhys/fetch-mock/pull/63.patch"},"body":"The main goal of this PR is to allow users of this library to stub non-json or text requests. I ran into a problem where I wanted to stub a call with type='arrayBuffer' and I wasn't able to, because the body was being `JSON.stringified`. Let me know if there are any other changes you'd like to see!"},"comment":{"url":"https://api.github.com/repos/wheresrhys/fetch-mock/issues/comments/176347818","html_url":"https://github.com/wheresrhys/fetch-mock/pull/63#issuecomment-176347818","issue_url":"https://api.github.com/repos/wheresrhys/fetch-mock/issues/63","id":176347818,"user":{"login":"wheresrhys","id":447559,"avatar_url":"https://avatars.githubusercontent.com/u/447559?v=3","gravatar_id":"","url":"https://api.github.com/users/wheresrhys","html_url":"https://github.com/wheresrhys","followers_url":"https://api.github.com/users/wheresrhys/followers","following_url":"https://api.github.com/users/wheresrhys/following{/other_user}","gists_url":"https://api.github.com/users/wheresrhys/gists{/gist_id}","starred_url":"https://api.github.com/users/wheresrhys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wheresrhys/subscriptions","organizations_url":"https://api.github.com/users/wheresrhys/orgs","repos_url":"https://api.github.com/users/wheresrhys/repos","events_url":"https://api.github.com/users/wheresrhys/events{/privacy}","received_events_url":"https://api.github.com/users/wheresrhys/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T19:08:23Z","updated_at":"2016-01-28T19:08:23Z","body":"Thanks for implementing this. Adding blob support has been on my todo list for a while.\r\n\r\nI would however rather use a boolean `parseAsJson` which defaults to `true`. \r\n\r\nPros of this approach would be \r\n- I can't see that I would ever want the library to have any built in transforms for other data types (the json one is only there because it's overwhelmingly the most common use case)\r\n- It reduces the risk of people being caught out by e.g. returning an object `{title: '1984', type: 'book'}` - I'm pretty sure (will need to revisit the code to check) this would mean they'd get an empty 200 response if `type` is used by fetchmock\r\n\r\nIf you can tweak the PR to accommodate this I'll merge once it's done"}}