ПС
Size: a a a
ПС
GV
ВР
ВР
ПС
ПС
E
const {longitude, latitude} = position.coords;
//const proxy = 'https://cors-anywhere.herokuapp.com/';
const url = `https://api.gismeteo.net/v2/weather/current/?latitude=${latitude}&longitude=${longitude}`;
fetch(url, {
method: 'GET',
mode: 'no-cors',
headers: {
'X-Gismeteo-Token' : '56b30cb255.3443075',
'Accept-Encoding' : 'deflate, gzip'
}
})
.then( response => response.json())
.then( json => console.log(json))
.catch(() => {throw new Error('Сбой сервера')});
E
ВР
K
K