getResource = async (url, opts) => {
const res = await fetch(`${this.proxyurl}${this._apiBase}${url}`, opts);
const body = await res;
return body.json();
};
getCities = async (token) => {
// console.log(token);
const url = '/api/v1/cities/';
const cities = await this.getResource(url,
{
method: 'GET',
// credentials: 'include',
headers: { 'Authorization': `Bearer ${token}`}
});
console.log(cities);
return cities
};
:authority: fan-foto-ml753mfuuq-uc.a.run.app
:method: GET
:path: /api/v1/login/access-token
:scheme: https
accept: */*
accept-encoding: gzip, deflate, br
accept-language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7
cache-control: no-cache
origin: http://localhost:3000
pragma: no-cache
referer: http://localhost:3000/
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36