Relative Content

Tag Archive for reactjsapiexpofetchapk

i have problem with my react native fitness app where i have fetch for food database that works on pc but doesnt work on apk

const fetchData = async () => { try { const response = await fetch(http://api.edamam.com/api/food-database/v2/parser?app_id=181e5eb4&app_key=key&ingr=${food}
&nutrition-type=cooking&181e5eb4=0633a8e3dc27c8ba43caf5b67709cd32 ); const jsonData = await response.json(); setDataPerServing(jsonData); setData(jsonData.parsed[0].food); setVisible("inline"); } catch (error) { console.error("There was an error fetching the data:", error); } };