Bootstrap FreeKB - Curl - Include option from a file using the -K or --config option
Curl - Include option from a file using the -K or --config option

Updated:   |  Curl articles

Some curl commands can contain quite a few command line options. For example, let's say you have the following curl command, which is using the --insecure flag to ignore SSL warnings, the --silent flag to hide the progress bar, and the --request GET option to issue a GET request to https://www.example.com/api. 

curl --insecure --silent --request GET --url https://www.example.com/api

 

The options and flags can be stored in a configuration file. For example, let's say a file named curl.config contains the following.

--insecure --silent --request GET

 

You can then use the -K or --config option to include the curl.config file.

curl --config curl.config --url https://www.example.com/api

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 724fdd in the box below so that we can be sure you are a human.