title: Sending HTTP Requests Through Azure
body: <p>I am trying to interact with Urbanairship via their broadcast API to send notifications to android devices on an INSERT into a Azure table.</p>
  
  <p>My JavaScript INSERT code on Azure is as follows:</p>
  
  <pre><code>    function insert(item, user, request) {
  
          request.execute({
              success: function() {
                  request.respond(statusCodes.OK, item.id);
                  push();
              }
          });
      }
  
      function push() {
     var client = new XMLHttpRequest();
      var authen = 'UDQ3N...B'
      var url = "https://go.urbanairship.com/api/push/broadcast/";
      var data = '{ "android": { "alert": "Hello from Azure!"} }';
  
      client.open("POST", url, true);
      client.setRequestHeader('Authorization','Basic ' + authen); 
      client.setRequestHeader('Content-Type', 'application/json');
      client.setRequestHeader('Content-Length', '54');
      client.send(data);
  }
  </code></pre>
  
  <p>However I get no responses from Urbanairship. I am convinced its an issue with Azure because using fiddler the following HTTP Request works:</p>
  
  <pre><code>POST https://go.urbanairship.com/api/push/broadcast/ HTTP/1.1
  User-Agent: Fiddler
  Authorization: Basic UDQ3N...B
  Content-Type: application/json
  Host: go.urbanairship.com
  Content-Length: 54
  
  { "android": { "alert": "Hello from Urban Airship!"} }
  </code></pre>
  
  <p>So in essence, I am trying to repeat this call with JavaScript through Azure but having no luck. Any suggestions?</p>