File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -236,5 +236,25 @@ Vary: Accept-Encoding
236236X-Pingback: http://man.linuxde.net/xmlrpc.php
237237```
238238
239+ ** get请求 **
239240
240- <!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->
241+ ``` bash
242+ curl " http://www.baidu.com" # 如果这里的URL指向的是一个文件或者一幅图都可以直接下载到本地
243+ curl -i " http://www.baidu.com" # 显示全部信息
244+ curl -l " http://www.baidu.com" # 只显示头部信息
245+ curl -v " http://www.baidu.com" # 显示get请求全过程解析
246+ ```
247+
248+ ** post请求**
249+
250+ ``` bash
251+ curl -d " param1=value1¶m2=value2" " http://www.wangchujiang.com"
252+ ```
253+
254+ ** json格式的post请求**
255+
256+ ``` bash
257+ curl -l -H " Content-type: application/json" -X POST -d ' {"phone":"13521389587","password":"test"}' http://wangchujiang.com/apis/users.json
258+ ```
259+
260+ <!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->
You can’t perform that action at this time.
0 commit comments