javascript - getJSON works for some addresses, but not others -
having strange problem. i'm using getjson retrieve information online using following code:
$.getjson("url", function(json) { $("#quote").html(json.stringify(json)); });
strangely, have been able above code work when use https://api.whatdoestrumpthink.com/api/v1/quotes/random source. other sources have tried, such http://quotes.rest/qod.json not seem return anything. using codepen make page.
i can retrieve quotes first url , access how i'd to, not else. have tried using , ajax methods no avail. i'm relatively new code there must obvious i'm missing?
thanks help.
looks server uses https
protocol. correct url , try again. or provide logs if in case request fails.
Comments
Post a Comment