Tasty

부분 유료
Verified
분류별 Api Dojo | 업데이트됨 25 giorni fa | Food
인기

9.7 / 10

지연 시간

2,237ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

Don't know how to fetch data

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 mesi fa

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

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입