2020-05-22 linux命令之curl

1.get请求 -X GET

$ curl -X GET www.baidu.com # 也可不加-XGET,默认就是get方法

2.post请求 -X POST

3.请求头,-H

4.post请求的请求体 -d

curl -X POST -H {'Authorization': 'Splunk wkDb8sW0WI0GrOA00zvc1tQkutpB4DrAxSsMbN9eTq6vu39tWTheWzg9ba...'} -d {'search':'search index=main'} https://localhost:8089/services/search/jobs?output_mode=json

5.用户名密码验证 -u

curl -k -u 'username:password' https://localhost:8089/services/search/concurrency-settings

 

 
posted @ 2020-05-23 01:23  陈雪莲  阅读(289)  评论(0编辑  收藏  举报

welcome to myblog