最佳答案
我需要通过cURL从命令行发出POST请求。此请求的数据位于一个文件中。我知道通过PUT,这可以用--upload-file
选项来完成。
curl host:port/post-file -H "Content-Type: text/xml" --data "contents_of_file"