I'm trying to use angularJS to pull data from the following API that generates random phrases: link
Here is a snippet of the code I am using:
$http({ method: 'GET', url: ' http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=json&lang=en' }).then(function successCallback(response) { alert("Teste A!"); }, function errorCallback(response) { alert("Teste B!"); });
However, I'm not getting any response (no alerts are executed), let alone pulling the data I want: the phrase and the author. How can I solve this?