Skype username validation - No Access control allow origin header is present
<p>I'm just following another <a href="https://stackoverflow.com/questions/8951625/skype-username-validation">SO question</a> to perform the skype user name validation. When i perform the HTTP POST </p>

<p>POST <a href="https://login.skype.com/json/validator" rel="nofollow noreferrer">https://login.skype.com/json/validator</a></p>

<p>data params : new_username='XXX'</p>

<p>using <code>Postman</code> chrome plugin, I'm getting the below valid response to it. so, i think this API method is allowed to be performed</p>

<pre><code>{
  "status": 406,
  "status_text": "valid",
  "data": {
    "markup": "Skype Name not available",
    "alternatives": true,
    "fieldDetails": "&lt;label&gt;Suggestions&lt;/label&gt;&lt;ul&gt;&lt;li&gt;&lt;label&gt;&lt;input class=\"skypeNameSuggestion\" type=\"radio\" name=\"selectSkypeName\" value=\"keerthivasan.ramanathan1\"/&gt;keerthivasan.ramanathan1&lt;/label&gt;&lt;/li&gt;&lt;/ul&gt;"
  }
}
</code></pre>

<p>But, when i perform the same stuff in angular js service, i get the below error. Can someone explain the behind scenes nuances involved? I'm sure the preflight response fails. How can i make it pass? How does it work properly with Postman app in chrome?  I have also made configuration changes to http headers in angular</p>

<pre><code>app.config(['$stateProvider', '$urlRouterProvider','$httpProvider',
  function($stateProvider, $urlRouterProvider, $httpProvider) {
    $httpProvider.defaults.useXDomain = true;
    delete $httpProvider.defaults.headers.common['X-Requested-With'];
</code></pre>

<p><strong>ERROR</strong>
XMLHttpRequest cannot load <a href="https://login.skype.com/json/validator" rel="nofollow noreferrer">https://login.skype.com/json/validator</a>. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost" rel="nofollow noreferrer">http://localhost</a>' is therefore not allowed access.</p>

<p>Can someone help me understand? Also, if someone knows a better option to findout, if a skype name is valid using angular js. Please let me know</p>