Linux curl usage

use curl for rest api

curl -u username:password -X GET -H"Content-Type: application/json" restapi address

example : 

curl -u username:password -X GET -H"Content-Type: application/json" http://coli51.qad.com/rest/api/latest/issue/->?search\&fields=issuetype,status

 

Running this command may show operating log, add parameter '-s' can make it silent

example: 

curl -s -u username:password -X GET -H"Content-Type: application/json" http://coli51.qad.com/rest/api/latest/issue/->?search\&fields=issuetype,status

  

for detailed manpage http://curl.haxx.se/docs/manpage.html

posted @ 2015-11-04 11:18  Ray.Yang  阅读(200)  评论(0编辑  收藏  举报