{"action":"created","issue":{"url":"https://api.github.com/repos/vedmack/feedback_me/issues/34","labels_url":"https://api.github.com/repos/vedmack/feedback_me/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/vedmack/feedback_me/issues/34/comments","events_url":"https://api.github.com/repos/vedmack/feedback_me/issues/34/events","html_url":"https://github.com/vedmack/feedback_me/issues/34","id":53496631,"number":34,"title":"ajax.beforeSend overriding","user":{"login":"gEndelf","id":310866,"avatar_url":"https://avatars.githubusercontent.com/u/310866?v=3","gravatar_id":"","url":"https://api.github.com/users/gEndelf","html_url":"https://github.com/gEndelf","followers_url":"https://api.github.com/users/gEndelf/followers","following_url":"https://api.github.com/users/gEndelf/following{/other_user}","gists_url":"https://api.github.com/users/gEndelf/gists{/gist_id}","starred_url":"https://api.github.com/users/gEndelf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gEndelf/subscriptions","organizations_url":"https://api.github.com/users/gEndelf/orgs","repos_url":"https://api.github.com/users/gEndelf/repos","events_url":"https://api.github.com/users/gEndelf/events{/privacy}","received_events_url":"https://api.github.com/users/gEndelf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-06T09:32:12Z","updated_at":"2015-02-02T15:46:36Z","closed_at":null,"body":"With overriding ajax.beforeSend in plugin - global handler in $.ajaxSetup.beforeSend will be not executed."},"comment":{"url":"https://api.github.com/repos/vedmack/feedback_me/issues/comments/72479040","html_url":"https://github.com/vedmack/feedback_me/issues/34#issuecomment-72479040","issue_url":"https://api.github.com/repos/vedmack/feedback_me/issues/34","id":72479040,"user":{"login":"gEndelf","id":310866,"avatar_url":"https://avatars.githubusercontent.com/u/310866?v=3","gravatar_id":"","url":"https://api.github.com/users/gEndelf","html_url":"https://github.com/gEndelf","followers_url":"https://api.github.com/users/gEndelf/followers","following_url":"https://api.github.com/users/gEndelf/following{/other_user}","gists_url":"https://api.github.com/users/gEndelf/gists{/gist_id}","starred_url":"https://api.github.com/users/gEndelf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gEndelf/subscriptions","organizations_url":"https://api.github.com/users/gEndelf/orgs","repos_url":"https://api.github.com/users/gEndelf/repos","events_url":"https://api.github.com/users/gEndelf/events{/privacy}","received_events_url":"https://api.github.com/users/gEndelf/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T15:46:36Z","updated_at":"2015-02-02T15:46:36Z","body":"python/django requires **csrftoken** in POST params and to avoid each time add param I'm using such code:\r\n\r\n```\r\n$.ajaxSetup({\r\n    beforeSend: function(xhr, settings) {\r\n        if(!(/^http:.*/.test(settings.url) || /^https:.*/.test(settings.url))) {\r\n            xhr.setRequestHeader(\"X-CSRFToken\", $.cookie('csrftoken'));\r\n        }\r\n    }\r\n});\r\n```"}}