{"action":"created","issue":{"url":"https://api.github.com/repos/Nobatek/flask-rest-api/issues/18","repository_url":"https://api.github.com/repos/Nobatek/flask-rest-api","labels_url":"https://api.github.com/repos/Nobatek/flask-rest-api/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/Nobatek/flask-rest-api/issues/18/comments","events_url":"https://api.github.com/repos/Nobatek/flask-rest-api/issues/18/events","html_url":"https://github.com/Nobatek/flask-rest-api/issues/18","id":370456368,"node_id":"MDU6SXNzdWUzNzA0NTYzNjg=","number":18,"title":"No way to set custom headers","user":{"login":"dryobates","id":4051569,"node_id":"MDQ6VXNlcjQwNTE1Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/4051569?v=4","gravatar_id":"","url":"https://api.github.com/users/dryobates","html_url":"https://github.com/dryobates","followers_url":"https://api.github.com/users/dryobates/followers","following_url":"https://api.github.com/users/dryobates/following{/other_user}","gists_url":"https://api.github.com/users/dryobates/gists{/gist_id}","starred_url":"https://api.github.com/users/dryobates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dryobates/subscriptions","organizations_url":"https://api.github.com/users/dryobates/orgs","repos_url":"https://api.github.com/users/dryobates/repos","events_url":"https://api.github.com/users/dryobates/events{/privacy}","received_events_url":"https://api.github.com/users/dryobates/received_events","type":"User","site_admin":false},"labels":[{"id":437576204,"node_id":"MDU6TGFiZWw0Mzc1NzYyMDQ=","url":"https://api.github.com/repos/Nobatek/flask-rest-api/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-16T06:22:41Z","updated_at":"2018-11-23T19:50:49Z","closed_at":null,"author_association":"NONE","body":"In regular flask function I could return headers as last parameter:\r\n\r\nreturn body, status_code, headers\r\n\r\nThat's how I return e.g. \"Location\" header.\r\n\r\nIn flask-rest-api I can't return such tuple nor Response object with custom headers because Api.response requires object to serialize.\r\n\r\nI see that there is some headers handling in code https://github.com/Nobatek/flask-rest-api/blob/master/flask_rest_api/response.py#L74 but I do not know how to elegantly set them in my function.\r\n\r\nIf there's no elegant way then maybe handling return value as in flask (https://github.com/pallets/flask/blob/master/flask/app.py#L1890) should be implemented?"},"comment":{"url":"https://api.github.com/repos/Nobatek/flask-rest-api/issues/comments/441309934","html_url":"https://github.com/Nobatek/flask-rest-api/issues/18#issuecomment-441309934","issue_url":"https://api.github.com/repos/Nobatek/flask-rest-api/issues/18","id":441309934,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTMwOTkzNA==","user":{"login":"ocryle","id":44534519,"node_id":"MDQ6VXNlcjQ0NTM0NTE5","avatar_url":"https://avatars1.githubusercontent.com/u/44534519?v=4","gravatar_id":"","url":"https://api.github.com/users/ocryle","html_url":"https://github.com/ocryle","followers_url":"https://api.github.com/users/ocryle/followers","following_url":"https://api.github.com/users/ocryle/following{/other_user}","gists_url":"https://api.github.com/users/ocryle/gists{/gist_id}","starred_url":"https://api.github.com/users/ocryle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocryle/subscriptions","organizations_url":"https://api.github.com/users/ocryle/orgs","repos_url":"https://api.github.com/users/ocryle/repos","events_url":"https://api.github.com/users/ocryle/events{/privacy}","received_events_url":"https://api.github.com/users/ocryle/received_events","type":"User","site_admin":false},"created_at":"2018-11-23T19:50:49Z","updated_at":"2018-11-23T19:50:49Z","author_association":"NONE","body":"Yeah, that seems to be a much better way to do this.\r\n\r\nThank you!"}}
{"actor":{"display_login":"ocryle"}}