Football Prediction

FREEMIUM
Par boggio | Mise à jour il y a 17 jours | Sports
Popularité

9.9 / 10

Latence

1,643ms

Niveau de service

100%

Health Check

N/A

Retour à toutes les discussions

key in react.js

Rapid account: Carlos Giil 97
CarlosGiil97
il y a 3 ans
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 il y a 3 ans

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)

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires