Football Prediction

免费增值
通过 boggio | 已更新 hace 17 días | Sports
人气

9.9 / 10

延迟

1,633ms

服务等级

100%

Health Check

N/A

返回所有讨论

key in react.js

Rapid account: Carlos Giil 97
CarlosGiil97
hace 3 años
Currently I am doing it like this:

const url = “https://football-prediction-api.p.rapidapi.com/api/v2/performance-stats”;

But I get an error that I am missing the api-key, how could I use it?

Thank you

Rapid account: Boggio Analytics
boggio-analytics Commented hace 3 años

You need to provide an opts parameter when you do the fetch, something like this

    const opts = {
        headers: {
            Accept: "application/json",
            "Content-Type": "application/json",
            "X-RapidApi-Key": "YOUR_KEY",
            "User-Agent": "APP_NAME + VERSION"
        },
        cache: "no-cache",
    };

    fetch(url, opts)

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论