Stock Price

FREEMIUM
Por fridaystock | Atualizado hace un mes | Finance
Popularidade

6.7 / 10

Latência

246ms

Nível de serviço

100%

Health Check

N/A

Voltar para todas as discussões

Getting 502 (Bad Gateway) Error

Rapid account: Jwdlmh A V Td Be 3 Wfyd
jwdlmh-aVTdBe3Wfyd
hace 2 años

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 hace 2 años

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);
});

Junte-se à discussão - adicione o comentário abaixo:

Efetue login / inscreva-se para postar novos comentários