Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4116845
  • 博文数量: 447
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 5786
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-27 06:48
个人简介

读好书,交益友

文章分类

全部博文(447)

文章存档

2023年(6)

2022年(29)

2021年(49)

2020年(16)

2019年(15)

2018年(23)

2017年(67)

2016年(42)

2015年(51)

2014年(57)

2013年(52)

2012年(35)

2011年(5)

分类: 网络与安全

2018-06-26 10:18:40

For posting data:


curl --data "param1=value1¶m2=value2"
For file upload:


-F/--form Specify HTTP multipart POST data (H)
fieldName是指字段名
curl -F "fieldNameHere=@myfile.html" 
curl --form "fileupload=@filename.txt"
curl -H "Content-Type: multipart/related" --form "data=@example.jpg;type=image/jpeg"
curl -X POST -F 'image=@/path/to/pictures/picture.jpg'


RESTful HTTP Post:


curl -X POST -d @filename


For logging into a site (auth):


curl -d "username=admin&password=admin&submit=Login" --dump-header headers
curl -L -b headers

阅读(1371) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~