How do I measure request and response times at once using cURL?

From this brilliant blog post… https://blog.josephscott.org/2011/10/14/timing-details-with-curl/ cURL supports formatted output for the details of the request (see the cURL manpage for details, under -w, –write-out <format>). For our purposes we’ll focus just on the timing details that are provided. Times below are in seconds. Create a new file, curl-format.txt, and paste in: time_namelookup: %{time_namelookup}s\n time_connect: %{time_connect}s\n time_appconnect: %{time_appconnect}s\n time_pretransfer: … Read more

How do I make curl ignore the proxy?

I assume curl is reading the proxy address from the environment variable http_proxy and that the variable should keep its value. Then in a shell like bash, export http_proxy=”; before a command (or in a shell script) would temporarily change its value. (See curl’s manual for all the variables it looks at, under the ENVIRONMENT heading.)

curl: (35) SSL connect error

curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2 You are using a very old version of curl. My guess is that you run into the bug described 6 years ago. Fix is to update your curl.

wget/curl large file from google drive

WARNING: This functionality is deprecated. See warning below in comments. Have a look at this question: Direct download from Google Drive using Google Drive API Basically you have to create a public directory and access your files by relative reference with something like Alternatively, you can use this script: https://github.com/circulosmeos/gdown.pl

cURL to show response headers after submiting a file

Use -i From the cURL manual Note also: The first will show headers, followed by body. The second will send a HEAD request so can’t be used in your example as you’re POSTing data. Edit The header output using -i is echoed to stdout, the same as the request body so directing the response into a PDF file … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)