curl是一个强大的网络请求lib,虽然强大,但是参数太多哈,不得不吐槽,下面列举一下常用使用方法,供大家CV
POST 请求
入门:
curl -X POST "http://localhost:8020/upload"
简单:
curl -X POST "http://localhost:8020/upload" -H "accept: */*"
大师:
curl -X POST "http://localhost:8020/upload" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "[email protected];type=application/pdf" -F "type=xxusertype"
curl -i -X POST \
http://localhost:8020/page \
-H 'Content-Type: application/json' \
-d '{"pageNum":1, "pageSize":10, "totalNum":0}'
标签:http,upload,curl,命令,举例,8020,POST,Curl,localhost
From: https://www.cnblogs.com/bigjor/p/17109858.html