Football Prediction

부분 유료
분류별 boggio | 업데이트됨 לפני 17 ימים | Sports
인기

9.9 / 10

지연 시간

1,633ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

key in react.js

Rapid account: Carlos Giil 97
CarlosGiil97
לפני 3 שנים
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 לפני 3 שנים

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)

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입