Amazon

免费增值
通过 Gautruche | 已更新 vor 3 Monaten | eCommerce
人气

9.8 / 10

延迟

6,115ms

服务等级

99%

返回所有讨论

products sometimes return and sometimes don't

avatar
csabbah
vor 4 Monaten

The API works just fine but it doesn’t always return the data every time

This is my code:

var fetchApi = async (url) => {
try {
var res = (res = await fetch(url, amazonOptions));
var data = await res.json();

if (res.status >= 400) {
  alert('No data returned');
} else {
  console.log(data);
}

} catch (error) {
alert(‘Failed to connect to API due to network issues’);
}
};

const amazonOptions = {
method: ‘GET’,
headers: {
‘X-RapidAPI-Host’: ‘amazon24.p.rapidapi.com’,
‘X-RapidAPI-Key’: ‘**********************’,
},
};

var amazonUrl =
https://amazon24.p.rapidapi.com/api/product?keyword=ipad&country=US’;

fetchApi(amazonUrl);

avatar
b2g.corporation commented vor 4 Monaten

Discussion closed

avatar
b2g.corporation commented vor 4 Monaten

Hello,

New version deployed.

Best regards,

avatar
b2g.corporation commented vor 4 Monaten

Hello,

We will deploy a new version in few hours.

Thank you,

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论
打分:4.5 - 投票:2