как получить этот api json из (fetch или axios js) с localhost?

https://api.privatbank.ua/p24api/exchange_rates?json&date=01.12.2018

вот так не работает {Access to fetch at 'https://api.privatbank.ua/p24api/exchange_rates?json&date=01.12.2018' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.}
fetch('https://api.privatbank.ua/p24api/exchange_rates?json&date=01.12.2018')
                .then((response => {
                    console.log(response);

                }))
   
    //вот так тоже 
    fetch('https://api.privatbank.ua/p24api/exchange_rates?json&date=01.12.2018', {
                    mode: 'no-cors'
                })
                .then((response => {
                    console.log(response);

                }))

Спасибо

Ответы (1 шт):

Автор решения: Wockeez

Если ошибка по CORSам тогда можно запустить chrome в режиме no-cors и посмотреть запрос пройдет или нет (инфа гуглится)

→ Ссылка