{"action":"created","issue":{"url":"https://api.github.com/repos/square/retrofit/issues/261","labels_url":"https://api.github.com/repos/square/retrofit/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/square/retrofit/issues/261/comments","events_url":"https://api.github.com/repos/square/retrofit/issues/261/events","html_url":"https://github.com/square/retrofit/issues/261","id":16554941,"number":261,"title":"Add Means of Intercepting and Rewiting Requests and Responses Fully","user":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars.githubusercontent.com/u/66577?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/square/retrofit/milestones/2","html_url":"https://github.com/square/retrofit/milestones/2.0","labels_url":"https://api.github.com/repos/square/retrofit/milestones/2/labels","id":374620,"number":2,"title":"2.0","description":"","creator":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars.githubusercontent.com/u/66577?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":13,"state":"open","created_at":"2013-07-10T00:10:48Z","updated_at":"2015-04-20T04:38:17Z","due_on":null,"closed_at":null},"comments":30,"created_at":"2013-07-10T00:23:56Z","updated_at":"2015-05-28T07:16:13Z","closed_at":null,"body":"This will facilitate signing, changing, replacing, etc. See #197 and #224 for more things it will need to support.\r\n\r\nLike dealing with headers in the existing implementation, these have a want of being both global and local to an API method which, while not difficult, clutters the APIs.\r\n\r\nDraft:\r\n```java\r\n// Read the content of a request and add a signing header.\r\n@POST(\"/foo\")\r\n@RequestInterceptor(OauthSigningInterceptor.class)\r\nResponse doSomething();\r\n```\r\n```java\r\n// Grab child JSON from the response (e.g., {\"data\": {realdata}}) and use it for deserialization.\r\n@GET(\"/foo\")\r\n@ResponseInterceptor(DeclutterInterceptor.class)\r\nFoo doSomething();\r\n```\r\n```java\r\n// Set global interceptors for adding auth headers, etc.\r\nRestAdapter ra = new RestAdpater.Builder()\r\n    .setGlobalRequestInterceptor(..)\r\n    .setGlobalResponseInterceptor(..)\r\n    .build()\r\n```"},"comment":{"url":"https://api.github.com/repos/square/retrofit/issues/comments/106205356","html_url":"https://github.com/square/retrofit/issues/261#issuecomment-106205356","issue_url":"https://api.github.com/repos/square/retrofit/issues/261","id":106205356,"user":{"login":"jdreesen","id":424602,"avatar_url":"https://avatars.githubusercontent.com/u/424602?v=3","gravatar_id":"","url":"https://api.github.com/users/jdreesen","html_url":"https://github.com/jdreesen","followers_url":"https://api.github.com/users/jdreesen/followers","following_url":"https://api.github.com/users/jdreesen/following{/other_user}","gists_url":"https://api.github.com/users/jdreesen/gists{/gist_id}","starred_url":"https://api.github.com/users/jdreesen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdreesen/subscriptions","organizations_url":"https://api.github.com/users/jdreesen/orgs","repos_url":"https://api.github.com/users/jdreesen/repos","events_url":"https://api.github.com/users/jdreesen/events{/privacy}","received_events_url":"https://api.github.com/users/jdreesen/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T07:16:13Z","updated_at":"2015-05-28T07:16:13Z","body":"Not `retrofit.RequestInterceptor.RequestFacade` but [OkHttp interceptors](https://github.com/square/okhttp/wiki/Interceptors) ;)"}}