【发布时间】:2019-10-21 16:24:25
【问题描述】:
尝试使用 curl 对 https://transfer.sh 进行 curl 并且响应正文从屏幕上消失。我从终端制作了一个 gif:https://giphy.com/gifs/hvjZcaFbRPl9LbsBXg
我正在尝试运行这个 cmd,其中 test 是一个文本文件:
curl --upload-file test https://transfer.sh
对于解决方法,我使用的是内联 python 脚本,效果很好:
python -c 'import requests; print(requests.post("https://transfer.sh/", files={"upload_file": open("test","rb")}).text)'
【问题讨论】:
-
我面临着同样的行为,但仅限于 zsh。我的意思是 bash 它按预期工作。你是不是也觉得 "curl"+"zsh" 好像是个问题? (如果是,也许问题应该重命名,包括zsh)有人知道这是curl或zsh的错误还是只是预期的“不兼容”?