var options = {
method: 'GET',
url: 'https://cpu-data.p.rapidapi.com/cpus',
headers: {
'x-rapidapi-host': 'cpu-data.p.rapidapi.com',
'x-rapidapi-key': '3b1a72ccdemsh3c7f0914fef948bp10cf67jsna19641d4c3fc'
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
```
the error occurs when running this app on my computer
הצטרף לדיון - הוסף תגובה למטה:
Resolved
Just tested the endpoint with similar code and got the expected result.
Is your header key valid?
Investigating …