Tasty

GRATIS CON POSSIBILITÀ DI UPGRADE
Verified
Da Api Dojo | Aggiornamento 16日前 | Food
Popolarità

9.7 / 10

Latenza

2,310ms

Livello di servizio

100%

Health Check

N/A

Torna a tutte le discussioni

Don't know how to fetch data

Rapid account: Aivisvigoreimarts

const url = ‘https://platform.fatsecret.com/rest/server.api’;
const options = {
method: ‘GET’,
headers: {
‘X-RapidAPI-Key’: ‘eb5b7b5c8cfc48a08af5b9c39be760ff’,
‘X-RapidAPI-Host’: ‘tasty.p.rapidapi.com’,
‘Authorization’: Bearer ${key},
‘Content-Type’: ‘application/json’
}
};

    onMounted(() => {
        fetch(url, options)
            .then(response => response.json())
            .then(data => {
                characters.value = data //.results as Character[]
            })
            .catch(error => {
                console.error('Error fetching data:', error);
            });

    })

    console.log(characters.value);
Rapid account: Apidojo
apidojo Commented 7ヶ月前

Hello, please have a look at https://docs.rapidapi.com/docs/basics-creating-a-project to get started.
Regards

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti