I am trying to send a βGETβ request to a remote REST API from the command line via cURL as follows:
curl -X GET -H "Content-type: application/json" -H "Accept: application/json" "http://server:5050/a/c/getName/{"param0":"pradeep"}"
But it does not return the output. I tried to check the URL directly from the browser, I can get the answer successfully, I donβt understand what is wrong with the command.
Basically, I want to set the "GET" request to a remote REST service, which gives me json data as a response via curl. Can someone guide me, what mistake am I making? I tried different posts, but they all talk about POST requests not GET.
json rest curl
Pradeep Simha Jan 24 '14 at 6:59 2014-01-24 06:59
source share