const instance = axios.create({ baseURL: 'https://some-domain.com/api/', timeout: 1000, headers: {'Authorization': 'Bearer '+token} }); instance.get('/path') .then(response => { return response.data; })