title: Angularjs - Using $http on a HTTPS URL
body: <p>I am trying to use the $http service on a HTTPS URL with the following code : </p>
  
  <pre><code>var request = $http.post('https://my.custom.url/webservice', privateAttributes.requestData);
  request.success(function(data, status) {
  
  }).error(function(data, status) {
      console.log('data -', data);
      console.log('status -', status);
  });
  </code></pre>
  
  <p>The my.custom.url is on a different domain as my angularJS app, but my webserver is well configured to allow cross domain XHR request. It's supposed to be a public webservice.</p>
  
  <p>When the request is sent, the promise is instantly rejected, so the <code>error()</code> function is triggered. The <code>data</code> is <code>undefined</code> and the <code>status</code> is <code>0</code>.</p>
  
  <p>On the network tab of my debugger in Chrome, I can see a pending OPTIONS request corresponding to my <code>$http.post()</code> call.</p>
  
  <p>For testing purpose, I tried to do the same request with jQuery <code>$.post()</code> method and it worked with no issue. I think I am making something wrong with the <code>$http</code> service.</p>
  
  <p>Please note that it's not a XSRF issue and if I use the HTTP version of my webservice, the request is a success.</p>
  
  <p>Thanks for your help.</p>