const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener(‘readystatechange’, function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open(‘GET’, ‘https://amazon-merchant-data.p.rapidapi.com/get-asin?gtin=0194252099537&country=de’);
xhr.setRequestHeader(‘x-rapidapi-key’, ‘e3715af119msh8b68b82a1d9183ep1dd006jsn12d77dd98e13’);
xhr.setRequestHeader(‘x-rapidapi-host’, ‘amazon-merchant-data.p.rapidapi.com’);
xhr.send(data);