{"action":"created","issue":{"url":"https://api.github.com/repos/claudiajs/example-projects/issues/8","repository_url":"https://api.github.com/repos/claudiajs/example-projects","labels_url":"https://api.github.com/repos/claudiajs/example-projects/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/claudiajs/example-projects/issues/8/comments","events_url":"https://api.github.com/repos/claudiajs/example-projects/issues/8/events","html_url":"https://github.com/claudiajs/example-projects/issues/8","id":168962706,"number":8,"title":"web-api-custom-headers example is misleading","user":{"login":"dacort","id":1512,"avatar_url":"https://avatars.githubusercontent.com/u/1512?v=3","gravatar_id":"","url":"https://api.github.com/users/dacort","html_url":"https://github.com/dacort","followers_url":"https://api.github.com/users/dacort/followers","following_url":"https://api.github.com/users/dacort/following{/other_user}","gists_url":"https://api.github.com/users/dacort/gists{/gist_id}","starred_url":"https://api.github.com/users/dacort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dacort/subscriptions","organizations_url":"https://api.github.com/users/dacort/orgs","repos_url":"https://api.github.com/users/dacort/repos","events_url":"https://api.github.com/users/dacort/events{/privacy}","received_events_url":"https://api.github.com/users/dacort/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-02T19:03:11Z","updated_at":"2016-08-02T23:13:37Z","closed_at":"2016-08-02T22:36:47Z","body":"Hi there, thanks for putting this project together - makes it _significantly_ easier to build a web API on top of Lambda. 👏 \r\n\r\nI ran into an issue using the customer headers in the `web-api-custom-headers` example. \r\n\r\nSpecifically, the example shows passing a custom header for \"Content-Type\", which led me to believe this was the way to set the content type of a response. Unfortunately, this causes Lambda to send quoted responses.\r\n\r\nFor example \r\n```\r\n\"this is some\\ntext\"\r\n``` \r\ninstead of\r\n```\r\nthis is some\r\ntext\r\n```\r\n\r\nAfter looking at the `web-serving-html` example, I noticed a special `contentType` parameter. When using that, the responses are unquoted, as expected. \r\n\r\nI would recommend making it clear somewhere of this behavior, or updating the custom headers example to use the `contentType` parameter - it was pretty confusing and took a while to track down what was going on."},"comment":{"url":"https://api.github.com/repos/claudiajs/example-projects/issues/comments/237078097","html_url":"https://github.com/claudiajs/example-projects/issues/8#issuecomment-237078097","issue_url":"https://api.github.com/repos/claudiajs/example-projects/issues/8","id":237078097,"user":{"login":"dacort","id":1512,"avatar_url":"https://avatars.githubusercontent.com/u/1512?v=3","gravatar_id":"","url":"https://api.github.com/users/dacort","html_url":"https://github.com/dacort","followers_url":"https://api.github.com/users/dacort/followers","following_url":"https://api.github.com/users/dacort/following{/other_user}","gists_url":"https://api.github.com/users/dacort/gists{/gist_id}","starred_url":"https://api.github.com/users/dacort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dacort/subscriptions","organizations_url":"https://api.github.com/users/dacort/orgs","repos_url":"https://api.github.com/users/dacort/repos","events_url":"https://api.github.com/users/dacort/events{/privacy}","received_events_url":"https://api.github.com/users/dacort/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T23:13:37Z","updated_at":"2016-08-02T23:13:37Z","body":"Why does the explanation for custom headers use the `Content-Type` key in the headers value? Is that different from the `contentType` parameter specified in the docs?\r\n\r\nThat's why I'm confused, because if you specify a `Content-Type` header, it doesn't actually format the response properly so the custom headers documentation is misleading."}}
{"actor":{"display_login":"dacort"}}