CPU Data

פרמיום
על ידי Ian Karanja | מְעוּדכָּן un mese fa | Database
פּוֹפּוּלָרִיוּת

7.8 / 10

חֶבִיוֹן

403ms

רמת שירות

100%

Health Check

N/A

חזרה לכל הדיונים

Error: Parse Error: Invalid header token

Rapid account: Alanngo
alanngo
2 anni fa
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 un anno fa

Resolved

Rapid account: Ranjian 0
ranjian0 Commented 2 anni fa

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 anni fa

Investigating …

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות