Why cross site API calls are allowed for some APIs but not others
<p>I have been building a weather widget with JavaScript.</p>

<p>I use angularjs ($http method:get) to make the api calls.</p>

<p>I have had no problem getting weather information using below API call (my api key is removed)</p>

<p><a href="http://api.openweathermap.org/data/2.5/weather?q=Manchester,uk&amp;appid=xxxxxxxx&amp;units=metric" rel="nofollow">http://api.openweathermap.org/data/2.5/weather?q=Manchester,uk&amp;appid=xxxxxxxx&amp;units=metric</a></p>

<p>But when I wanted to switch to a different API (URL below) I get the error </p>

<p>XMLHttpRequest cannot load <a href="https://api.forecast.io/forecast/33.499318,-2.234089000000026?units=si" rel="nofollow">https://api.forecast.io/forecast/33.499318,-2.234089000000026?units=si</a>. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost:50301" rel="nofollow">http://localhost:50301</a>' is therefore not allowed access.</p>

<p>Is this because the second API uses HTTPS? but it doesn't make sense. why was the first api allowed?</p>