Monday, November 4, 2019

Some curl command options

To access a web page:
$ curl

If the web server does not provide a trusted certificate, or it is using a self-signed certificate, we can accept the it by using the -k option:
$ curl -k

To turn on verbose mode:
$ curl -v -k

To use HTTP 1.0:
$ curl -v -k --http1.0

To remove the "Host:..." header:
$ curl -v -k --http1.0 -H 'Host:'

To remove more headers:
$ curl -v -k --http1.0 -H 'Host:' -H 'User-Agent:' -H 'Accept:'

No comments:

Get This <