// creating axios
const api = axios.create({
baseURL: https://speech.googleapis.com/v1/operations,
crossDomain: true,
responseType: 'json',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization':'your_key
},
});
// calling api
api.get('/speech_name')
.then(res=>{
console.log(res);
}).
catch('error');
Примечание: вы также можете использовать другой метод запроса api.post(url)