Sign in | Sign up

Receiving error when I query in android

Tagged:

Currently contains 1 post

Avatar

April 15, 2015 22:01

amirsaifi77@gmail.com

I am trying to send a query through a HTTPPost with my full URL which is
https://api.nutritionix.com/v1_1/search/[itemSearched]?results=0%3A5&cal_min=0&cal_max=50000&fields=item_name%2Cbrand_name%2Cnf_calories%2Cnf_total_fat%2Cnf_total_carbohydrate%2Cnf_protein%2Cnf_serving_size_qty%2Cnf_serving_size_unit%2Cnf_serving_weight_grams&appId=[myID]&appKey=[myKey]

and when I paste this link into my browser it goes to a page with the correct JSON results, but when I get the JSON Result from Android I get

{"error_message":“Error: invalid json”,“message”:“Questions? Reference this errors ‘_id’ on the Nutritionix Forum. https://developer.nutritionix.com/forum”,“recommendations”:“Check your Request Details. You may have incorrectly used some params, or the request was malformed.”,“req_info”:{"_parsedUrl":{"protocol":null,slashes,auth,host,port,hostname,hash,“search”:"? ……

What am I doing wrong to get this result returned?

Thanks

Reply to thread