使用 curl --data-urlencode 从文件读取内容
您可以使用以下命令从文件中读取内容,并将其作为参数传递给 --data-urlencode 选项:
curl --data-urlencode 'data@filename' URL
其中,data 是您要传递的参数名称,filename 是包含要传递内容的文件的路径,URL 是要发送请求的目标 URL。
例如,如果要将文件 example.txt 的内容作为参数传递给 URL http://example.com,您可以执行以下命令:
curl --data-urlencode 'data@example.txt' http://example.com
原文地址: https://www.cveoy.top/t/topic/peRH 著作权归作者所有。请勿转载和采集!