Добрый!
Хочу наладить API на clck.ru но меня систематически валит ошибка:
XMLHttpRequest cannot load
https://clck.ru/--?url=https://learn...hr-crossdomain. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
var XHR = ("onload" in new XMLHttpRequest()) ? XMLHttpRequest : XDomainRequest;
var xhr = new XHR();
xhr.open('GET', 'https://clck.ru/--?url=https://learn.javascript.ru/xhr-crossdomain', true);
//xhr.onload = function() {
// console.log( this.responseText );
//}
//xhr.onerror = function() {
// console.log( 'Ошибка ' + this.status );
//}
xhr.send();
Я что-то не пойму как использовать этот сервис.
Читал статью на которую пытаюсь сделать короткую статью. Явного примера там нет. По моему уже все перепробовал.