curl命令常用参数

参考链接:

http://www.ruanyifeng.com/blog/2019/09/curl-reference.html

-i:打印 http 消息头
-k:忽略ssl证书校验
-L:302继续请求
-H:设置请求消息头
-d:带post消息体
-X:设置http方法

例子:
curl -H “Content-Type:application/json” -d ‘{“operatorname”:“super”}’ http://x.x.x.x:port/xxx

curl -X POST ‘http://x.x.x.x:port/epg/delEpgServer?epgids=xxx’

curl -X PATCH -H “Content-type:application/merge-patch+json” -d ‘{“spec”:{“replicas”: 2,“template”: {“spec”: {“nodeSelector”: {“epg”: “20002”}}}}}’ ‘http://x.x.x.x:port/apis/apps/v1beta1/namespaces/default/statefulsets/xx’

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章