瀏覽代碼

curl: add --header example

James Carlos 9 年之前
父節點
當前提交
b38813ca3f
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      pages/common/curl.md

+ 4 - 0
pages/common/curl.md

@@ -23,6 +23,10 @@
 
 `curl --head {{http://localhost}}`
 
+- include an extra header
+
+`curl --header "{{X-MyHeader: 123}}" {{http://localhost}}`
+
 - pass a user name and password for server authentication
 
 `curl -u myusername:mypassword {{http://localhost}}`