view server response
response body:
curl URL
response header (actual HEAD request):
curl -I URL
response header and body:
curl -i URL
to see request as well add -v, which adds extra info to stderr.
to make -v output cleaner pipe stdout to /dev/null and suppress progress meter:
curl -vs URL > /dev/null
moar options:
-A 'user agent'
-u 'user:password'
-k, --insecure don't check cert validity
-L follow redirects
measure connection times
curl -s -w @.curl-format-times.txt -o /dev/null URL
timeout
php guzzle timeout ought () to be the entire libcurl transfer operation, which should include
everything starting form name resolving, connection and data transfer. connect_timeout is only the
first part.
() according to someoine in the internet
proxy
http_proxy=<ip>:<port> curl <url>
view certificate
openssl s_client -servername DOMAIN -connect DOMAIN:PORT < /dev/null
openssl s_client -servername DOMAIN -connect DOMAIN:PORT < /dev/null 2> /dev/null | openssl x509 -noout -dates
-showcerts displays sent intermediate certificates as well.