title: HTTP post in iMacros with Javascript for Firefox
body: <p>I was making a automation script to extract some info from a website, And It's important to submit some info using POST method. Can anyone tell me how to use HTTP Post method with Imacro &amp; javascript for firefox plugin. Below is the script which i found here : <a href="https://stackoverflow.com/questions/14873443/sending-an-http-post-using-javascript-triggered-event">Sending an HTTP Post using Javascript triggered event</a>
  But it's giving me error when i play the same using Imacro player.</p>
  
  <pre><code>var url = "http://www.google.com/";
  var method = "POST";
  var postData = "Some data";
  var async = true;
  
  var request = new XMLHttpRequest();
  request.onload = function () {
  var status = request.status; // HTTP response status, e.g., 200 for "200 OK"
  var data = request.responseText; // Returned data, e.g., an HTML document.
  }
  
  request.open(method, url, async);
  
  request.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
  request.send(postData);
  </code></pre>