Tasty

फ्रीमियम
Verified
द्वारा Api Dojo | अपडेट किया गया hace 22 días | Food
लोकप्रियता

9.7 / 10

लेटेंसी

2,249ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

Don't know how to fetch data

Rapid account: Aivisvigoreimarts
aivisvigoreimarts
hace 7 meses

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 hace 7 meses

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

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें