Last active
August 29, 2015 13:56
-
-
Save clops/9051923 to your computer and use it in GitHub Desktop.
Need a quick test for a POST request? Paste the following into your FireBug Console
This file contains 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
//create a handler | |
var xhr = new XMLHttpRequest(); | |
//define where the data will be sent to | |
xhr.open("POST", "http://someawesomehost/"); | |
//set some chololate headers | |
xhr.setRequestHeader("Content-type", "application/json"); | |
//and send ya content | |
xhr.send('{"some_id":123456, "foo":"bar"}'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment