我试图用来cURL
将数据发布到URL。URL要求<form>
提交,并且<textarea>
字段具有指定的值。我将值存储在一个文本文件中,我想运行cURL
将文件中数据的内容发布到网页上。这就是我所拥有的-但是我认为我没有正确地转义文件位置:
curl -data info='@filename.txt' https://file.com/test > tmp.txt
Run Code Online (Sandbox Code Playgroud)
查看手册页,将文件内容作为POST变量发送的正确语法是:
curl --data-urlencode 'info@filename.txt' https://file.com/test > tmp.txt
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1563 次 |
最近记录: |