Curl: Difference between revisions
From DWIKI
Created page with "=HOWTO= ==Check supported TLS version== curl -I -v --tlsv1.2 --tls-max 1.2 https://www.example.com/" |
m →HOWTO Tag: wikieditor |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
==Check supported TLS version== | ==Check supported TLS version== | ||
curl -I -v --tlsv1.2 --tls-max 1.2 https://www.example.com/ | curl -I -v --tlsv1.2 --tls-max 1.2 https://www.example.com/ | ||
==Specify hostname for https request== | |||
Try | |||
curl -H "Host: some.name" https://example.com | |||
vague stuff, ignore | |||
https://stackoverflow.com/questions/50279275/curl-how-to-specify-target-hostname-for-https-request | |||
curl --resolve example.com:443:192.0.2.1 https://example.com | |||
==Get only the http status code== | |||
curl -s -o /dev/null -w "%{http_code}" http://www.example.org/ | |||
==Disable certificate verification== | |||
curl -k | |||
Latest revision as of 08:52, 7 May 2026
HOWTO
Check supported TLS version
curl -I -v --tlsv1.2 --tls-max 1.2 https://www.example.com/
Specify hostname for https request
Try
curl -H "Host: some.name" https://example.com
vague stuff, ignore
https://stackoverflow.com/questions/50279275/curl-how-to-specify-target-hostname-for-https-request
curl --resolve example.com:443:192.0.2.1 https://example.com
Get only the http status code
curl -s -o /dev/null -w "%{http_code}" http://www.example.org/
Disable certificate verification
curl -k
