B
const instance = axios.create({
baseURL: 'https://some-domain.com/api/',
timeout: 1000,
headers: {'X-Custom-Header': 'foobar'}
});
как потом запросы делать на другие пути?
instance.get('my_path')
?Size: a a a
B
const instance = axios.create({
baseURL: 'https://some-domain.com/api/',
timeout: 1000,
headers: {'X-Custom-Header': 'foobar'}
});
instance.get('my_path')
?S
const instance = axios.create({
baseURL: 'https://some-domain.com/api/',
timeout: 1000,
headers: {'X-Custom-Header': 'foobar'}
});
instance.get('my_path')
?З🧟
const instance = axios.create({
baseURL: 'https://some-domain.com/api/',
timeout: 1000,
headers: {'X-Custom-Header': 'foobar'}
});
instance.get('my_path')
?F
А
B
F
B
F
B
instance.get('something')
axios.get(baseUrl + function_path)
З🧟
З🧟
KS
instance.get('something')
axios.get(baseUrl + function_path)
F
З🧟
З🧟
З🧟
F
F
З🧟