lib/fatsecret_lite.rb in fatsecret_lite-0.1.3 vs lib/fatsecret_lite.rb in fatsecret_lite-0.2.0

- old
+ new

@@ -39,17 +39,18 @@ end def get_food_details(food_id) access_token = get_access_token - response = RestClient.get( + response = RestClient.post( 'https://platform.fatsecret.com/rest/server.api', - params: { + { method: 'food.get.v2', food_id: food_id, format: 'json' }, - headers: { + { + content_type: :json, Authorization: "Bearer #{access_token}" } ) JSON.parse(response.body)