{"issue":{"state":"closed","created_at":"2011-03-03T18:18:49Z","updated_at":"2011-11-21T12:26:18Z","comments":11,"user":{"gravatar_id":"3e7e975f0fa432f4ae6604f72c132309","id":55398,"url":"https://api.github.com/users/kumar303","login":"kumar303","avatar_url":"https://secure.gravatar.com/avatar/3e7e975f0fa432f4ae6604f72c132309?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Hi.  This patch was needed to test custom code that calls ``xhr.setRequestHeader()``, like this:\r\n\r\n    $('html').ajaxSend(function(event, xhr, ajaxSettings) {\r\n        if (!/^https?:/.test(ajaxSettings.url)) {\r\n            // Only send the token to relative URLs i.e. locally.\r\n            csrf = $.cookie('csrftoken') || $(\"#csrfmiddlewaretoken\").val();\r\n            xhr.setRequestHeader(\"X-CSRFToken\", csrf);\r\n        }\r\n    });","assignee":null,"id":644143,"labels":[{"name":"More Info","color":"ededed","url":"https://api.github.com/repos/appendto/jquery-mockjax/labels/More+Info"},{"name":"Needs Unit Tests","color":"e10c02","url":"https://api.github.com/repos/appendto/jquery-mockjax/labels/Needs+Unit+Tests"}],"number":20,"pull_request":{"patch_url":"https://github.com/appendto/jquery-mockjax/pull/20.patch","html_url":"https://github.com/appendto/jquery-mockjax/pull/20","diff_url":"https://github.com/appendto/jquery-mockjax/pull/20.diff"},"title":"allows custom set headers to be inspected","closed_at":"2011-11-21T12:26:05Z","html_url":"https://github.com/appendto/jquery-mockjax/issues/20","url":"https://api.github.com/repos/appendto/jquery-mockjax/issues/20","milestone":null},"action":"created","comment":{"created_at":"2011-11-21T12:26:18Z","updated_at":"2011-11-21T12:26:18Z","user":{"gravatar_id":"a9d4d2558b560b0ef168ced0f6c5198c","id":52585,"url":"https://api.github.com/users/jzaefferer","login":"jzaefferer","avatar_url":"https://secure.gravatar.com/avatar/a9d4d2558b560b0ef168ced0f6c5198c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Thanks, landed!","id":2814539,"url":"https://api.github.com/repos/appendto/jquery-mockjax/issues/comments/2814539"}}