CPU Data

GRATIS CON POSSIBILITร€ DI UPGRADE
Da Ian Karanja | Aggiornamento a month ago | Database
Popolaritร 

7.9 / 10

Latenza

950ms

Livello di servizio

100%

Health Check

N/A

Torna a tutte le discussioni

Error: Parse Error: Invalid header token

Rapid account: Alanngo
alanngo
2 years ago
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
Rapid account: Ranjian 0
ranjian0 Commented a year ago

Resolved

Rapid account: Ranjian 0
ranjian0 Commented 2 years ago

Just tested the endpoint with similar code and got the expected result.

var axios = require("axios").default;

var options = {
  method: 'GET',
  url: 'https://cpu-data.p.rapidapi.com/cpus',
  headers: {
    'x-rapidapi-host': 'cpu-data.p.rapidapi.com',
    'x-rapidapi-key': 'XXXXXXXXXXXXXXXXXXXXXXXXXX'
  }
};

axios.request(options).then(function (response) {
	console.log(response.data);
}).catch(function (error) {
	console.error(error);
});

Is your header key valid?

Rapid account: Ranjian 0
ranjian0 Commented 2 years ago

Investigating โ€ฆ

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti