Stock Price

FREEMIUM
Door fridaystock | Bijgewerkt a month ago | Finance
Populariteit

6.8 / 10

Latency

246ms

Serviceniveau

100%

Health Check

N/A

Terug naar alle discussies

Getting 502 (Bad Gateway) Error

Rapid account: Jwdlmh A V Td Be 3 Wfyd
jwdlmh-aVTdBe3Wfyd
2 years ago

I am getting a 502 (Bad Gateway) error when I do the fetch api in Javascript. Plus message that says {message: ‘API Request failed due to Provider configuration e…application/json. Please contact the API Provider’, info: ‘Your Client (working) —> Gateway (working) —> API (not working)’}

It says to contact API provider. Wondering if you guys know how I can fix this issue?

Rapid account: Fridaystock
fridaystock Commented 2 years ago

Hello!
Thanks for reaching out. I just tested this both via the sandbox console and JS axios and all seems to be working as intended. Are you still having this issue? Here’s some example code to try with.

const axios = require("axios");

const options = {
    method: 'GET',
    url: 'https://stock-price4.p.rapidapi.com/price/TSLA',
    headers: {
        'X-RapidAPI-Host': 'stock-price4.p.rapidapi.com',
        'X-RapidAPI-Key': 'YOURKEY'
    }
};

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

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen