{"action":"created","issue":{"url":"https://api.github.com/repos/RobertHerhold/IcedFrisby/issues/11","labels_url":"https://api.github.com/repos/RobertHerhold/IcedFrisby/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/RobertHerhold/IcedFrisby/issues/11/comments","events_url":"https://api.github.com/repos/RobertHerhold/IcedFrisby/issues/11/events","html_url":"https://github.com/RobertHerhold/IcedFrisby/pull/11","id":96519095,"number":11,"title":"refactor(lib): add check for content-type header","user":{"login":"davidlinse","id":291518,"avatar_url":"https://avatars.githubusercontent.com/u/291518?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlinse","html_url":"https://github.com/davidlinse","followers_url":"https://api.github.com/users/davidlinse/followers","following_url":"https://api.github.com/users/davidlinse/following{/other_user}","gists_url":"https://api.github.com/users/davidlinse/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlinse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlinse/subscriptions","organizations_url":"https://api.github.com/users/davidlinse/orgs","repos_url":"https://api.github.com/users/davidlinse/repos","events_url":"https://api.github.com/users/davidlinse/events{/privacy}","received_events_url":"https://api.github.com/users/davidlinse/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-22T09:23:20Z","updated_at":"2015-07-22T14:36:31Z","closed_at":"2015-07-22T14:35:47Z","pull_request":{"url":"https://api.github.com/repos/RobertHerhold/IcedFrisby/pulls/11","html_url":"https://github.com/RobertHerhold/IcedFrisby/pull/11","diff_url":"https://github.com/RobertHerhold/IcedFrisby/pull/11.diff","patch_url":"https://github.com/RobertHerhold/IcedFrisby/pull/11.patch"},"body":"This fixes the unchecked overwriting of an already \r\ndefined `Content-Type` header field set via `#addHeader()`\r\nwhen sending a `PUT` request with `{ json: true }`\r\n\r\nSample: \r\n```javascript\r\nfrisby\r\n  .create()\r\n  .setHeader('content-type', 'application/json;charset=utf-8')\r\n  .put('http://endpoint/', {}, { json:true }\r\n  .inspectRequest()\r\n  .toss()\r\n```\r\n\r\nOutput from ```#inspectRequest()```\r\nBefore: \r\n\r\n```json\r\n'content-type': 'application/json'\r\n```\r\n\r\nAfter:\r\n\r\n```json\r\n'content-type': 'application/json;charset=UTF-8'\r\n```"},"comment":{"url":"https://api.github.com/repos/RobertHerhold/IcedFrisby/issues/comments/123743411","html_url":"https://github.com/RobertHerhold/IcedFrisby/pull/11#issuecomment-123743411","issue_url":"https://api.github.com/repos/RobertHerhold/IcedFrisby/issues/11","id":123743411,"user":{"login":"RobertHerhold","id":8069753,"avatar_url":"https://avatars.githubusercontent.com/u/8069753?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertHerhold","html_url":"https://github.com/RobertHerhold","followers_url":"https://api.github.com/users/RobertHerhold/followers","following_url":"https://api.github.com/users/RobertHerhold/following{/other_user}","gists_url":"https://api.github.com/users/RobertHerhold/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertHerhold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertHerhold/subscriptions","organizations_url":"https://api.github.com/users/RobertHerhold/orgs","repos_url":"https://api.github.com/users/RobertHerhold/repos","events_url":"https://api.github.com/users/RobertHerhold/events{/privacy}","received_events_url":"https://api.github.com/users/RobertHerhold/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T14:36:31Z","updated_at":"2015-07-22T14:36:31Z","body":"Thanks!"}}