How to use HTTP Basic authentication with cURL

To access sites that use HTTP Basic authentication with curl, use command

Or

If you don’t specify password, curl will promt for password. See curl […]

Read More…

curl using cookie

Here is some example of using curl to login to site, use cookie to do further requests.

See curl […]

Read More…

Check if HTTP/2 enabled using curl

To see if a web site have HTTP/2 enabled, you can run

If you see 2, the site have HTTP/2 enabled. Example

Here is a site with no HTTP/2

[…]

Read More…

Making POST request from curl

Here is an example POST request using curl

Sending JSON string

[…]

Read More…

Using Host Header in curl

When you have multiple web site hosted on a server, if you want to access one of the site using curl to IP of the server, then you need to pass Host header value. For example

If you want to show debug info, add –verbose

[…]

Read More…

curl

Making POST request from curl Using Host Header in curl curl set user agent Check if HTTP/2 enabled using curl Fetch as Google with curl curl using cookie How to use HTTP Basic authentication with cURL View Header To view response header, use

Specify Host Header Example

Using Proxy To connect to proxy […]

Read More…