quote generator using this API http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en but when I use $.getJSON(url, function ...) I got this message in the console:
XMLHttpRequest cannot load http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. . This happens in mozilla and in chrome and I don't know what to do about it. I run it at localhost and in file:// . Why this happens and how do I solve it?
you can use axios to make the request and get the response, then you can do whatever you want with it
Обсуждают сегодня