title: In azure functions using javascript how to call send request to a endpoint
body: <p>In Azure function how to call an API using <strong>javascript</strong>. The request is POST with the header.I tried to use <strong>XMLHttpRequest</strong>, but i got exception like this XMLHttpRequest is not defined.</p>
  
  <pre><code>var client = new XMLHttpRequest();
      var authentication = 'Bearer ...'
      var url = "http://example.com";
      var data = '{.........}';
  
      client.open("POST", url, true);
      client.setRequestHeader('Authorization',authentication); 
      client.setRequestHeader('Content-Type', 'application/json');
  
      client.send(data);
  </code></pre>
  
  <p>Any other method is there to achive this,</p>