Recipe - Food - Nutrition

フリーミアム
Verified
よって David | 更新済み il y a 17 jours | Food
人気

9.9 / 10

レイテンシー

517ms

サービスレベル

100%

Health Check

N/A

すべてのディスカッションに戻る

Calling Get Recipe Information

Rapid account: Sterls 20
Sterls20
il y a 8 ans

How to I call Get Recipe Information from a client when the recipe id is not a query string parameter?

Rapid account: Spoonacular
spoonacular Commented il y a 8 ans

Ah I see. Well no you cannot pass the id as a GET parameter, it must be part of the URL, that is RESTful design. The tool you are using limits you tremendously if it does not allow you to set URL path params…but can’t you just do url.replace("{id},recipeId)?

Rapid account: Sterls 20
Sterls20 Commented il y a 8 ans

Please forgive my ignorance, but it is not clear to me how to call

GetRecipeInformation //spoonacular-recipe-food-nutrition-v1.p.mashape.com/recipes/{id}/information

when {id} is not a query string parameter e.g. /information?id=XXXXX. I am first calling SearchRecipes and then selecting one recipe ID to be used in calling GetRecipeInformation. The API connector I am using in my application only allows me to build a query string of key/value pairs vs. replace a value in the URL path structure.

Rapid account: Spoonacular
spoonacular Commented il y a 8 ans

Sorry, I don’t quite understand your question. Why should the recipe id not part of the URL?

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿