-
-
Save Hemanthkumar2112/068833b1af1b5493ad077a9db3445c3c to your computer and use it in GitHub Desktop.
AJAX POST
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xhr = new XMLHttpRequest(); | |
xhr.open("POST", "add_specs/", false); | |
xhr.setRequestHeader("Cache-Control", "no-cache"); | |
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); | |
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken')); | |
data = JSON.stringify(spec_rows); | |
xhr.send(data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment