curl - 使用 CURL 重定向后发送表单数据
问题描述
我正在使用 curl 发送文件:
curl https://localhost/input.php --insecure -L --form "id=myId" --form "file[]=@/tmp/myFile"
只要我正在编写 http (并且不执行重定向),这一切正常。当我编写 时,http://localhost/input.php
Webserver 使用 302 重定向到 https 站点。curl
跟随该链接,但curl
不会将表单数据“重新发送”到目标。
即使在 302 重定向之后,我如何告诉 curl 重新发送 FORM 数据?
解决方案
推荐阅读
- python - 如何获取到本地主机的 HTTP 请求?
- python-3.x - 将数据从 csv 文件插入到 mongodb
- mysql - MySQL - utf8 字符无法在 Web 前端正确显示
- c++ - 无法使用 openssl 服务器,因为密码已过时...或其他...ERR_SSL_VERSION_OR_CIPHER_MISMATCH
- javascript - How do I open a page outside of the iframe but within the same tab?
- ruby - How to write a while loop properly
- r - R:无法将 .rda 文件加载到 R Studio -> 无法打开压缩文件“ESL.mixture.rda”,可能的原因“没有这样的文件或目录”
- routing - Ionic 4 路由不起作用 url 更改但视图没有出现
- c# - 如何发送超过 70 个字符的短信
- bash - Perl 在 Shell 脚本中搜索和替换