What is meaning of -vvv option in cURL request

浪子不回头ぞ 提交于 2019-12-10 01:52:45

问题


According to cURL documentation http://curl.haxx.se/docs/manpage.html

-v, --verbose

Makes the fetching more verbose/talkative.

But I came across

curl -vvv -u name@foo.com:password http://www.example.com 

What is the difference between -v and -vvv?


回答1:


tl;dr: there is no difference between -v and -vvv.

Specifying -v multiple times usually means to increase verbosity accordingly.

This is true, e.g for a software like memcached:

-v            verbose (print errors/warnings while in event loop)
-vv           very verbose (also print client commands/reponses)
-vvv          extremely verbose (also print internal state transitions)

(behind the scenes the options parser accumulates the level of verbosity).

But with curl command-line tool this is not the case. As you can see from tool_getparam.c, passing -v simply toggles the so-called trace type to TRACE_PLAIN. Passing -vv or -vvv does the same.




回答2:


Specifying -v multiple times usually means to increase verbosity accordingly. So in this case you'd expect a very verbose output (-v specified three times).



来源:https://stackoverflow.com/questions/24402473/what-is-meaning-of-vvv-option-in-curl-request

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!