macos Catalina上的卷曲未显示响应正文

问题描述 投票:0回答:1

尝试使带有卷曲的卷曲变为https://transfer.sh,并且响应主体从屏幕上消失。我从终端上制作了一个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)'
macos curl
1个回答
0
投票

curl似乎正在向终端返回回车符。尝试使用tr剥离回车符:

curl --upload-file test https://transfer.sh | tr -d '\r'

© www.soinside.com 2019 - 2024. All rights reserved.