Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

JS Post

By: a guest on Nov 21st, 2012  |  syntax: JavaScript  |  size: 0.53 KB  |  views: 152  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var request = new XMLHttpRequest();
  2. request.onreadystatechange= function () {
  3.     if (request.readyState==4) {
  4.         request.getAllResponseHeaders().toString();
  5.         //if I receive array('status' => 'Success',) - OK. If not - error. Please help with parsing
  6.     }
  7. };
  8.  
  9. request.open("POST", " qaapi.staffpass.eu/sppEnable?user_id=295753599", true);
  10. request.setRequestHeader("X-Qaapi-Auth-Secret", "kjdsGju76kjhJHGklk92");
  11. request.setRequestHeader("Accept","text/plain");
  12. request.send("post data"); // what should I add here?