I read that REST WS can be called from a command line. I know that they can be invok开发者_开发知识库ed from program code, but how directly from command line? I looked around the internet to know how this can be done, but didn't find any information on this. Can anyone please tell me how this can be done? I have developed a rest ws app in grails.
You can use curl from the commandline of any unix-like os.
For example, you can test some sample Facebook API like this:
curl https://graph.facebook.com/19292868552
or to POST:
curl -X POST -d "param1=value1¶m2=value2" http://example.com/resource.cgi
You could use curl to ask a URL. I guess your web service can be queried using HTTP? http://curl.haxx.se/
I believe you want to use cURL to do that.
精彩评论