{"action":"created","issue":{"url":"https://api.github.com/repos/zapier/zapier-platform-core/issues/13","repository_url":"https://api.github.com/repos/zapier/zapier-platform-core","labels_url":"https://api.github.com/repos/zapier/zapier-platform-core/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/zapier/zapier-platform-core/issues/13/comments","events_url":"https://api.github.com/repos/zapier/zapier-platform-core/issues/13/events","html_url":"https://github.com/zapier/zapier-platform-core/issues/13","id":210933939,"number":13,"title":"Headers are being lowercased","user":{"login":"bcooksey","id":221726,"avatar_url":"https://avatars0.githubusercontent.com/u/221726?v=3","gravatar_id":"","url":"https://api.github.com/users/bcooksey","html_url":"https://github.com/bcooksey","followers_url":"https://api.github.com/users/bcooksey/followers","following_url":"https://api.github.com/users/bcooksey/following{/other_user}","gists_url":"https://api.github.com/users/bcooksey/gists{/gist_id}","starred_url":"https://api.github.com/users/bcooksey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcooksey/subscriptions","organizations_url":"https://api.github.com/users/bcooksey/orgs","repos_url":"https://api.github.com/users/bcooksey/repos","events_url":"https://api.github.com/users/bcooksey/events{/privacy}","received_events_url":"https://api.github.com/users/bcooksey/received_events","type":"User","site_admin":false},"labels":[{"id":469576357,"url":"https://api.github.com/repos/zapier/zapier-platform-core/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-02-28T23:26:22Z","updated_at":"2017-03-22T10:44:45Z","closed_at":null,"body":"Setting a header in a `z.request` results in the header being lowercased when sent out on the wire.\r\n\r\nExample code snippet to reproduce:\r\n\r\n```javascript\r\n  const promise = z.request(`https://api.lyft.com/oauth/token`, {\r\n    method: 'POST',\r\n    json: {\r\n      code: bundle.inputData.code,\r\n      grant_type: 'authorization_code'\r\n    },\r\n    headers: {\r\n      'Content-Type': 'application/json',\r\n      'Authorization': auth_header\r\n    }\r\n  });\r\n```\r\n\r\nResulted in this request:\r\n\r\n```\r\nPOST https://api.lyft.com/oauth/token\r\nuser-agent: Zapier\r\ncontent-type: application/json; charset=utf-8\r\ncache-control: no-cache\r\nauthorization: <auth_header>\r\n```"},"comment":{"url":"https://api.github.com/repos/zapier/zapier-platform-core/issues/comments/288361133","html_url":"https://github.com/zapier/zapier-platform-core/issues/13#issuecomment-288361133","issue_url":"https://api.github.com/repos/zapier/zapier-platform-core/issues/13","id":288361133,"user":{"login":"BrunoBernardino","id":1239616,"avatar_url":"https://avatars0.githubusercontent.com/u/1239616?v=3","gravatar_id":"","url":"https://api.github.com/users/BrunoBernardino","html_url":"https://github.com/BrunoBernardino","followers_url":"https://api.github.com/users/BrunoBernardino/followers","following_url":"https://api.github.com/users/BrunoBernardino/following{/other_user}","gists_url":"https://api.github.com/users/BrunoBernardino/gists{/gist_id}","starred_url":"https://api.github.com/users/BrunoBernardino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrunoBernardino/subscriptions","organizations_url":"https://api.github.com/users/BrunoBernardino/orgs","repos_url":"https://api.github.com/users/BrunoBernardino/repos","events_url":"https://api.github.com/users/BrunoBernardino/events{/privacy}","received_events_url":"https://api.github.com/users/BrunoBernardino/received_events","type":"User","site_admin":false},"created_at":"2017-03-22T10:44:45Z","updated_at":"2017-03-22T10:44:45Z","body":"I'd vote on keeping the case people put, and checking if there's anything before really adding it to the headers (if there is an existing, case-insensitive match, remove it so the new key goes in instead)."}}
{"actor":{"display_login":"BrunoBernardino"}}