1

I am newbie to servlet. I am trying to call zomato API. I can call it using PHP - cURL. Now, I want to call it using servlet.

curl -X GET --header "Accept: application/json" --header "user-key: alksakdksldjalkdalak" "https://developers.zomato.com/api/v2.1/locations?query=vadodara"

Can someone tell me how to call this in servlet? Any help appreciated. Thanks in advance!!

Jaimin
  • 171
  • 1
  • 1
  • 11
  • Just use HttpUrlConnection object and set header parameter. Set user key as parameter. This ans might help you. https://stackoverflow.com/questions/8654876/http-get-using-android-httpurlconnection – Jaimin May 24 '17 at 15:57

0 Answers0