You can create a new instance of axios with a custom config.
const instance = axios.create({
baseURL: 'https://some-domain.com/api/',
timeout: 1000,
headers: {'X-Custom-Header': 'foobar'}
});
The available instance methods are listed below. The specified config will be merged with the instance config.
© 2011-2022 Kenneth Reitz and other contributors
Licensed under the Apache license.
https://axios-http.com/docs/instance