Skip to content

Instantly share code, notes, and snippets.

@clops
Last active August 29, 2015 13:56
Show Gist options
  • Save clops/9051923 to your computer and use it in GitHub Desktop.
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
//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