Stock Price

フリーミアム
よって fridaystock | 更新済み hace un mes | Finance
人気

6.2 / 10

レイテンシー

246ms

サービスレベル

100%

Health Check

N/A

すべてのディスカッションに戻る

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

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿