-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Seems like the app it generates a foodName without the actual food name.
For example:
const foodName = 3 + ; // Replace with the food you want to search for
const apiUrl = https://trackapi.nutritionix.com/v2/search/instant?query=${foodName};
const headers = {
"x-app-id": app_id,
"x-app-key": app_key,
"x-remote-user-id": 0
};
fetch(apiUrl, { headers })
.then((response) => {
if (response.status === 200) {
return response.json();
} else {
throw new Error(Error: HTTP response code ${response.status});
}
})
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error("Error:", error);
});

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels