Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is meaning of -vvv option in cURL request

Tags:

curl

options

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 [email protected]:password http://www.example.com 

What is the difference between -v and -vvv?

like image 792
pbaranski Avatar asked Jun 25 '14 07:06

pbaranski


People also ask

What is option in curl request?

To make an OPTIONS request with Curl, you must pass the -X OPTIONS command-line parameter to the Curl request. Browsers send OPTIONS requests when making a CORS request to another origin. The OPTIONS request does not return any data. All information is returned in the response headers.

What is curl K option?

The option tells curl to skip the verification of the server's TLS certificate – it will skip the cryptographic certificate verification (that it was signed by a trusted CA) and it will skip other certificate checks, like that it was made for the host name curl connects to and that it hasn't expired etc.

What is H in curl?

The -H in curl indicates the headers of the request, so your curl will translate to php like: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://thewebsite.com"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPGET, 1); curl_setopt($ch, CURLOPT_USERPWD, "app:app"); $headers = [ "Content- ...


1 Answers

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.

like image 58
deltheil Avatar answered Sep 22 '22 12:09

deltheil