title: Node - how send continuous HTTP responses back to client
body: <p>I am working on the node js and it is very new to me. Here I have the following functionality,
   I am calling the Http request from the JS and waiting for the responses back from the Http response. Here I am getting the response correctly, but in me scenario I am working on the sensor device. So, I need to get the continuous responses from the HTTP. I am using the </p>
  
  <pre><code>msg.res.send(200, 'Thanks for the request ');
  </code></pre>
  
  <p>and it is sending back 'Thanks for the request' to the client. But if I use </p>
  
  <pre><code>msg.res.send(200, 'Thanks for the request ');
  msg.res.send(200, 'Thanks for the request ');
  </code></pre>
  
  <p>like this continuously, first one working fine and getting error for second one like follows</p>
  
  <blockquote>
    <p>Error: Can't set headers after they are sent.</p>
  </blockquote>
  
  <p>Could please help me to solve this problem, because I need to get the continuous responses back from the HTTP to client.</p>
  
  <p>Thanks in Advance</p>