Linux下使用CURL Post文件+入参
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
搜了一下,大部分要么是只post参数,要么是只post文件的。同时post(表单入参 + 文件)好像没有,特记录一下。
通过Postman上传文件示例
对应的linux下curl post文件命令
curl -H “Content-Type:multipart/form-data” -F “requestNo=123” -F “source=1” -F “reqData={“userNo”:“123456”}” -F “file=@/your/path/Pictures.zip” http://192.168.100.100:80/service/uploadFiles > post.log
-H
指定hearders, 在该示例下可以省略-F
指定入参,特别是form表单入参,挨个传-F "file=@..."
@后接文件的路径> post.log
将日志信息打印在当前路径的post.log里面




A beautiful web dashboard for Linux
最近提交(Master分支:18 天前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
更多推荐
所有评论(0)