Home > Back-end >  Foodb api fetch react native
Foodb api fetch react native

Time:01-23

Hello I am a beginner in mobile app development. I am doing project in react native.In my app I need to fetch the food details from foodb website using API. I tried in postman to get response but I am getting error.

In foodb website they provided like this but I am getting Api missing error

enter image description here

Error:

  {
    "error": "food_name is missing, api_key is missing"
}

Kindly guide me to resolve this problem. Thanks in Advance

CodePudding user response:

You have to add parameter as query parameters:

curl -X GET 'https://foodb.ca/api/v1/foodreport/food?food_name=Angelicaa&api_key=d9b6cec3eb561db6f920a0797ba49f3e'
  • Related