Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
{ body: image, encoding: null, headers: { Authorization: 'Basic api: JnqeqUjIAiEfghfhmx4oWfghff1L9UoVwh' }, method: 'POST', url: 'https://api.tinify.com/shrink', }
var xhr = new XMLHttpRequest(); xhr.open('POST', 'https://api.tinify.com/shrink', true); xhr.setRequestHeader('Authorization', 'Basic api: JnqeqUjIAiEfghfhmx4oWfghff1L9UoVwh') xhr.send(image)
Failed to load https://api.tinify.com/shrink: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.