title: how to send HTTP request to submit form in node.js to another website?
body: <p>I want to submit a form of another sites &amp; want get response. But cant understand how to do this. Can anyone please help me ? </p>
  
  <p>My target site : <a href="http://xyz.php" rel="nofollow">http://xyz.php</a></p>
  
  <p>My code :</p>
  
  <pre><code>var http = require('http');
  var options = {
    host: 'xyz.com',
    path: '/xyz.php?textSearch=234567'
  };
  
  callback = function(response) {
    var str = '';
    response.on('data', function (chunk) {
      str += chunk;
    });
    response.on('end', function () {
      console.log(str);
    });
  }
  
  http.request(options, callback).end();
  </code></pre>