SHARE
TWEET

JS Post

a guest Nov 21st, 2012 264 Never
  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?
RAW Paste Data
Top