CURL命令

1、curl命令
curl是利用URL语法在命令行方式下工作的开源文件传输工具。
MAC 或者 Linux 自带 curl
git shell 自带curl
 
在开发web应用的时候模拟前端发起HTTP请求
 
curl URL 返回请求地址的内容
-i 返回HTTP头
-H 设置请求HTTP头,curl URL -H 'Content-Type: application/json'
-d 发起post 请求,后面跟内容。--data-urlencode 表示内容需要转义
-G 发起get 请求
-XPUT 指定put协议
-F上传文件
原文地址:https://www.cnblogs.com/jsersudo/p/11646728.html