为什么此CURL(shell / terminal)命令无法执行?

马克·A·多诺霍

好的,我很困惑。当我执行此CURL请求时,得到响应。响应是代理正在阻止它,但是我确实得到了响应...

curl http://1.2.3.4:8080/v1/digital/foundations/content/articles?presetList=dashboard \
    -H 'content-type: application/json' \
    -H 'countryCode: US' \
    -H 'uuid: 3456789' \
    -H 'client_id: 1234'

但是,当我执行此CURL请求时-唯一的更改是-x ""在开始时添加-CURL请求不会执行。我一直按回车键,而终端不断添加新行。我必须按下CMD-C才能摆脱困境。

curl -x "" http://1.2.3.4:8080/v1/digital/foundations/content/articles?presetList=dashboard \
    -H 'content-type: application/json' \
    -H 'countryCode: US' \
    -H 'uuid: 3456789' \
    -H 'client_id: 1234'

这是结果。看到光标在哪里?它只是一直往下走。

在此处输入图片说明

也尝试过这个,但是还是一样...

curl --noproxy "*" \
    http://1.2.3.4:8080/v1/digital/foundations/content/articles?presetList=dashboard \
    -H 'content-type: application/json' \
    -H 'countryCode: US' \
    -H 'uuid: 3456789' \
    -H 'client_id: 1234'

So why the heck does the first one execute, but the second and third, where I'm trying to disable the proxy, does it simply sit there with me pressing return? I've seen it happen occasionally with other commands too, but I never know what's causing it. Really frustrating.

anubhava

You should add -v or --verbose option to your curl command to get detailed debugging information printed on your terminal to help you trace source of the problem.

As per man curl:

-v, --verbose

在操作过程中使卷曲变得冗长。对于调试和查看“引擎盖”下发生的事情很有用'>'以curl发送的表示“ curl发送的'<'标题数据”,以curl接收的“ header data”在正常情况下是隐藏的,以行开头的行'*'表示curl提供的附加信息。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Rails + Passenger:无法执行Shell命令

为什么此查询无法执行?

为什么Python无法执行cmd命令“ tskill”?

如何解决MySql“无法执行此命令”错误?

CordovaError:无法执行shell命令“ getprop,dev.bootcomplete””

使用Paramiko写入Cisco Shell的命令无法执行

shell中带双引号的命令无法执行

为什么Korn Shell无法执行ctrl-r?

为什么我的cronjob无法执行我的shell脚本?

为什么我的Shell脚本无法执行?

KSH Shell脚本zip命令无法正常运行:eval:zip:无法执行[执行格式错误]

在vi中执行shell命令时无法执行shell / bin / zsh

Maya –为什么“清除历史记录”命令后无法执行Print方法?

为什么是'!!' 快捷方式无法执行先前运行的命令?

为什么python3无法执行某些linux命令?

为什么插件无法执行

为什么for循环无法执行?

为什么如果条件无法执行?

为什么验证功能无法执行

Powershell Start-Process:由于错误而无法执行此命令:访问被拒绝

为什么此curl命令返回意外的EOF

为什么此点击事件处理程序无法执行我的代码?

为什么我无法执行此代码(html 中的 js)?

为什么此Shell脚本在命令中插入单引号?

onSaveInstanceStateWorkAround之后无法执行此操作

Scala如何无法执行此功能?

在popen调用后如何检测shell是否无法执行命令?不要与命令退出状态混淆

为什么此Shell脚本程序无法正常工作

Maven:无法执行shell脚本