{"action":"created","issue":{"url":"https://api.github.com/repos/paulcbetts/refit/issues/23","repository_url":"https://api.github.com/repos/paulcbetts/refit","labels_url":"https://api.github.com/repos/paulcbetts/refit/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/paulcbetts/refit/issues/23/comments","events_url":"https://api.github.com/repos/paulcbetts/refit/issues/23/events","html_url":"https://github.com/paulcbetts/refit/issues/23","id":24897528,"number":23,"title":"Support for getting response headers","user":{"login":"ray2k","id":285272,"avatar_url":"https://avatars.githubusercontent.com/u/285272?v=3","gravatar_id":"","url":"https://api.github.com/users/ray2k","html_url":"https://github.com/ray2k","followers_url":"https://api.github.com/users/ray2k/followers","following_url":"https://api.github.com/users/ray2k/following{/other_user}","gists_url":"https://api.github.com/users/ray2k/gists{/gist_id}","starred_url":"https://api.github.com/users/ray2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray2k/subscriptions","organizations_url":"https://api.github.com/users/ray2k/orgs","repos_url":"https://api.github.com/users/ray2k/repos","events_url":"https://api.github.com/users/ray2k/events{/privacy}","received_events_url":"https://api.github.com/users/ray2k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2013-12-30T19:44:51Z","updated_at":"2016-05-26T11:32:36Z","closed_at":null,"body":"(This issue is at the request of @paulcbetts over twitter, in which I stated I'm willing to give a pull req a try, but some discussion on scenarios first.)\r\n\r\nI would like to see support for getting response headers out of the remote api call while still using a strongly typed response (or none at all). This would be for making calls against APIs (ex the azure management api) that return a unique request-id as a response header, which can be used in support cases when something unexpected/bad happens, or more frequently in the case of asynchronous calls in which a call is made against the api such as swapping an azure deployment, in order to take that returned request-id and query its status in a future api call. \r\n\r\nGiven the way refit is exposed to it's user, the most natural way I feel would be to use attributes i.e.\r\n\r\n```C#\r\n// async api that returns no body\r\n[Post(\"/some/asyncapi/{someId}\")]\r\nTask SomeAsyncRemoteApiCall(int someId, [ResponseHeader(\"x-request-id\")] out string requestId);\r\n\r\n// async api that returns body and requestid header\r\n[Post(\"/some/asyncapi/{someId}\")]\r\nTask<SomeResponse> SomeAsyncRemoteApiCall(int someId, [ResponseHeader(\"x-request-id\")] out string requestId);\r\n```\r\nI suppose that an alternative to the first one could be\r\n```C#\r\n[Post(\"/some/asyncapi/{someId}\")]\r\n[return: ResponseHeader(\"x-request-id\")]\r\nTask<string> SomeAsyncRemoteApiCall(int someId);\r\n```\r\nwhere the returned Task<string> is for the header, not the string content because the request doesn't return a body. But that seems a little wonky IMO.\r\n\r\nThoughts/comments/insults?\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/paulcbetts/refit/issues/comments/221846789","html_url":"https://github.com/paulcbetts/refit/issues/23#issuecomment-221846789","issue_url":"https://api.github.com/repos/paulcbetts/refit/issues/23","id":221846789,"user":{"login":"auriou","id":1873587,"avatar_url":"https://avatars.githubusercontent.com/u/1873587?v=3","gravatar_id":"","url":"https://api.github.com/users/auriou","html_url":"https://github.com/auriou","followers_url":"https://api.github.com/users/auriou/followers","following_url":"https://api.github.com/users/auriou/following{/other_user}","gists_url":"https://api.github.com/users/auriou/gists{/gist_id}","starred_url":"https://api.github.com/users/auriou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auriou/subscriptions","organizations_url":"https://api.github.com/users/auriou/orgs","repos_url":"https://api.github.com/users/auriou/repos","events_url":"https://api.github.com/users/auriou/events{/privacy}","received_events_url":"https://api.github.com/users/auriou/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T11:32:35Z","updated_at":"2016-05-26T11:32:35Z","body":"Does that has been implemented since?\r\n\r\n I would like get the header responses , how can we do?"}}
{"actor":{"display_login":"auriou"}}