Amazon

FREEMIUM
Door Gautruche | Bijgewerkt vor 5 Monaten | eCommerce
Populariteit

9.7 / 10

Latency

5,205ms

Serviceniveau

99%

Terug naar alle discussies

products sometimes return and sometimes don't

avatar
csabbah
vor 6 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 6 Monaten

Discussion closed

avatar
b2g.corporation commented vor 6 Monaten

Hello,

New version deployed.

Best regards,

avatar
b2g.corporation commented vor 6 Monaten

Hello,

We will deploy a new version in few hours.

Thank you,

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen
Beoordeling: 4.7 - Stemmen: 3