Skip to content

Instantly share code, notes, and snippets.

@rjfranco
Last active November 3, 2016 19:48
Show Gist options
  • Save rjfranco/679376910712d50ff8434a32d4915f23 to your computer and use it in GitHub Desktop.
Save rjfranco/679376910712d50ff8434a32d4915f23 to your computer and use it in GitHub Desktop.
Error Adding Custom Food on Eat This Much
{
"error_message": "Sorry, this request could not be processed. Please try again later."
}
curl 'https://www.eatthismuch.com/api/v1/food/' \
-XPOST \
-H 'Content-Type: application/json' \
-H 'Referer: https://www.eatthismuch.com/' \
-H 'Accept: application/json, text/javascript, */*; q=0.01' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14' \
-H 'Origin: https://www.eatthismuch.com' \
-H 'X-CSRFToken: ZncyOJS0EWJN4Bb2eiHDKtmCKSMyDPTB' \
-H 'X-Requested-With: XMLHttpRequest' \
--data-binary '{"food_name":"Rosarita No Fat Zesty Salsa Refried Beans","description":"","food_group_id":1100,"accurate_grams":true,"weights":[{"grams":100,"amount":100,"description":"grams"},{"grams":100,"amount":null,"description":"cup"}],"nutrition":{"calcium":20,"calories":100,"carbs":19,"cholesterol":0,"fats":0,"fiber":6,"iron":0.48,"magnesium":35,"manganese":0.3,"phosphorus":100,"potassium":429,"proteins":6,"saturated_fats":0,"sodium":600,"trans_fats":0,"vit_a":0,"vit_c":0,"sugar":1},"id":null,"major_ingredients":"","default_units":1,"main_dish":true,"images":[]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment