gpt4 book ai didi

macos - 在 macos Catalina 上 curl 不显示响应主体

转载 作者:行者123 更新时间:2023-12-04 02:43:03 25 4
gpt4 key购买 nike

试图 curl 到 https://transfer.sh使用 curl 和响应主体从屏幕上消失。我从我的终端制作了一个 gif:https://giphy.com/gifs/hvjZcaFbRPl9LbsBXg

我正在尝试运行这个命令,其中测试是一个文本文件:

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)'

最佳答案

可以用 -w "\n"修复:

curl --upload-file test -s -w "\n" https://transfer.sh

关于macos - 在 macos Catalina 上 curl 不显示响应主体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58451515/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com