开发者

Calling REST WS from command line

开发者 https://www.devze.com 2023-03-24 04:10 出处:网络
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

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&param2=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.

0

精彩评论

暂无评论...
验证码 换一张
取 消