【发布时间】:2011-09-18 12:43:38
【问题描述】:
我需要从命令行通过 cURL 发出 POST 请求。此请求的数据位于文件中。我知道通过 PUT 可以使用 --upload-file 选项来完成。
curl host:port/post-file -H "Content-Type: text/xml" --data "contents_of_file"
【问题讨论】:
-
对不起,也许我错误地描述了我的问题,我需要发送请求,而不是通过 php-curl,而只是通过来自 linux os 命令行的 curl 命令。
标签: http curl http-post command-line-interface