{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/4404","repository_url":"https://api.github.com/repos/emberjs/data","labels_url":"https://api.github.com/repos/emberjs/data/issues/4404/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/4404/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/4404/events","html_url":"https://github.com/emberjs/data/issues/4404","id":156984618,"number":4404,"title":"Expose more access to jqXHR object in handling adapter responses.","user":{"login":"lkhaas","id":3512988,"avatar_url":"https://avatars.githubusercontent.com/u/3512988?v=3","gravatar_id":"","url":"https://api.github.com/users/lkhaas","html_url":"https://github.com/lkhaas","followers_url":"https://api.github.com/users/lkhaas/followers","following_url":"https://api.github.com/users/lkhaas/following{/other_user}","gists_url":"https://api.github.com/users/lkhaas/gists{/gist_id}","starred_url":"https://api.github.com/users/lkhaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkhaas/subscriptions","organizations_url":"https://api.github.com/users/lkhaas/orgs","repos_url":"https://api.github.com/users/lkhaas/repos","events_url":"https://api.github.com/users/lkhaas/events{/privacy}","received_events_url":"https://api.github.com/users/lkhaas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-26T13:33:19Z","updated_at":"2016-05-26T15:31:14Z","closed_at":null,"body":"I would like to add some custom functionality when an AJAX request returns and need access to the jqXHR object.  The use case is to validate a server signature from an authentication proxy server that requires knowing the responseText from the jqXHR request.  I can't get to this from handleResponse.  I tried looking at using ajaxOptions to push a success callback but I see that the rest adapter would overwrite this with it's own success callback.\r\nhttps://github.com/emberjs/data/blob/fec260a38c3f7227ffe17a3af09973ce2718acca/addon/adapters/rest.js#L998\r\n\r\njQuery 1.5 and up allow an array of success callbacks which would give me one way of accomplishing this.\r\n\r\nAnother way would just be to allow handleResponse to get access to the underlying jqXHR rather than just the little bit of requestData.  It seems that ember-data is trying to insulate a bit from the type of AJAX call used, so I can see how this might be a bit distasteful.... \r\n\r\nI'm happy to work on a PR - but feel like there are a few directions this could go and want to work through the approaches before coding it up.\r\n\r\nOf course - if there is some super obvious way of getting back the raw response info from the request that I'm missing - that would be awesome too :)"},"comment":{"url":"https://api.github.com/repos/emberjs/data/issues/comments/221906313","html_url":"https://github.com/emberjs/data/issues/4404#issuecomment-221906313","issue_url":"https://api.github.com/repos/emberjs/data/issues/4404","id":221906313,"user":{"login":"lkhaas","id":3512988,"avatar_url":"https://avatars.githubusercontent.com/u/3512988?v=3","gravatar_id":"","url":"https://api.github.com/users/lkhaas","html_url":"https://github.com/lkhaas","followers_url":"https://api.github.com/users/lkhaas/followers","following_url":"https://api.github.com/users/lkhaas/following{/other_user}","gists_url":"https://api.github.com/users/lkhaas/gists{/gist_id}","starred_url":"https://api.github.com/users/lkhaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkhaas/subscriptions","organizations_url":"https://api.github.com/users/lkhaas/orgs","repos_url":"https://api.github.com/users/lkhaas/repos","events_url":"https://api.github.com/users/lkhaas/events{/privacy}","received_events_url":"https://api.github.com/users/lkhaas/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T15:31:14Z","updated_at":"2016-05-26T15:31:14Z","body":"OK - so this is my first ever ember-data PR.  I welcome any feedback on what I did right/wrong, etc.  Thanks!"}}
{"actor":{"display_login":"lkhaas"}}