我该如何在curl命令中传递内容长度,例如--header Content-Length:1000
。
我尝试在命令中这样使用,但没有起作用。
curl -v -X POST -u "xxx@gmail.com:xxx123" \
--header "Content-Length: 1000" \
--header "Content-Type: multipart/mixed" \
--header "X-REQUEST-ID:7fc7d038-4306-4fc5-89c3-7ac8a12a30d0" \
-F "request={\"bumId\":\"d51f2978-5ce8-4c71-8503-b0ca438741dd\",\"fileType\":\"imageFile\"};type=application/json" \
-F "file=@D:/file.pdf" \
"http://localhost:9090/pro/v1/files"
这个命令将文件发布到使用Jersey Java开发的Web服务