You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
As stated here, it would be nice to automatically add the current page's CSRF token to a POST request by jQuery.
Expected Behavior
When posting to the API, one is not required to always manually parse the CSRF token from the current page and send it to the backend.
Current Behavior
One is supposed to grap the token from the page every time one wants to post something:
We don't want to always manually add
csrfmiddlewaretoken: $("input[name=csrfmiddlewaretoken]").val()
.Possible Solution
Use one of jQuerys global AJAX handlers like .ajaxSend().
Checklist before submitting
The text was updated successfully, but these errors were encountered: