Hi,
today I started using your API, and I have a problem with the visualizeNutrition
endpoint.
If I try the example on Mashape:
curl -X POST --include 'https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/recipes/visualizeIngredients' \
-H 'X-Mashape-Key: foobarbaz' \
-H 'Accept: text/html' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'defaultCss=true' \
-d 'ingredientList=3 oz flour' \
-d 'measure=metric' \
-d 'servings=2' \
-d 'showBacklink=true' \
-d 'view=grid'
it works fine, but as you see there is only one ingredient.
The documentation says:
The ingredient list of the recipe, one ingredient per line.
So I did try in many different ways but non of them actually worked:
-d 'ingredientList=3 oz flour' -d 'ingredientList=1 cup skimmed butter'
-d 'ingredientList[]=3 oz flour' -d 'ingredientList[]=1 cup skimmed butter'
-d 'ingredientList=1cup lard^M1 kg of chicken breast'
-d 'ingredientList=1 cup lard\n1 kg of chicken breast'
-d $'ingredientList=1cup lard\n1 kg of chicken breast'
So here is the question in the title: how do I pass a list of ingredients into ingredientList
?
Junte-se à discussão - adicione o comentário abaixo:
Number 4 works for me though.