Tasty

FREEMIUM
Verified
Par Api Dojo | Mise à jour il y a 24 jours | Food
Popularité

9.7 / 10

Latence

2,240ms

Niveau de service

100%

Health Check

N/A

Retour à toutes les discussions

Don't know how to fetch data

Rapid account: Aivisvigoreimarts
aivisvigoreimarts
il y a 7 mois

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 il y a 7 mois

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

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

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