title: how to set content type in "request" npm package
body: <p>I am sendin a request from node server to some other server , but i need to send content type </p>
  
  <blockquote>
    <p>application/json</p>
  </blockquote>
  
  <p>How can i send that , I am using this format </p>
  
  <pre><code>request.post('https://server.com/index.php/rest/V1/integration/admin/token',{form:postData},function (error, response, body) {
      console.log('error:', error); // Print the error if one occurred
      console.log('statusCode:', response &amp;&amp; response.statusCode); // Print the response status code if a response was received
      console.log('body:', body); // Print the HTML for the Google homepage.
      res.json({
          'error': error,
          'statusCode': response &amp;&amp; response.statusCode,
          'body': body
      })
  });
  </code></pre>
  
  <p>I am getting error  while I am trying this </p>
  
  <pre><code> request.post(
          'https://server.com/index.php/rest/V1/integration/admin/token',
          {
              form:postData,
              headers:{ 
                  "Content-Type": "application/json"
              }
  
      },function (error, response, body) {
          console.log('error:', error); // Print the error if one occurred
          console.log('statusCode:', response &amp;&amp; response.statusCode); // Print the response status code if a response was received
          console.log('body:', body); // Print the HTML for the Google homepage.
          res.json({
              'error': error,
              'statusCode': response &amp;&amp; response.statusCode,
              'body': body
          })
      });
  </code></pre>
  
  <blockquote>
    <p>"message":"Server cannot understand Content-Type HTTP header media
    type application/x-www-form-urlencoded"</p>
  </blockquote>