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

原文地址:https://www.cnblogs.com/Raymond-Yang/p/4935398.html