curl的post和get请求接口示例

1. Get方式示例

curl --header "Authorization: 62b94903e4b0e57be39dbfc4" --insecure  -X GET 'https://域名/third/cmdb/api/model/list?page=1&pageSize=10'

2. Post方式示例

curl -d '{"resource_name":"q126","resource_usage":"ceshi1","resource_owner":"qzeng","data_classification":"公开","pi":"是","resource_mark":" ","status":"测试中","F1":"Test001","alarm_time":"2022-06-26","MJ":"t2"}' -H "Authorization: 62b94903e4b0e57be39dbfc4" -H "Content-Type: application/json" -k -X POST 'https://域名/third/cmdb/api/resource/ZqdTest1/addOfThird'

 

 

posted @ 2022-06-27 17:52  剑阁丶神灯  阅读(556)  评论(0编辑  收藏  举报