Football Prediction

GRATIS CON POSSIBILITร€ DI UPGRADE
Da boggio | Aggiornamento 17 days ago | Sports
Popolaritร 

9.9 / 10

Latenza

1,643ms

Livello di servizio

100%

Health Check

N/A

Torna a tutte le discussioni

key in react.js

Rapid account: Carlos Giil 97
CarlosGiil97
3 years ago
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 years ago

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)

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti