DEV Community

Jonas Brømsø
Jonas Brømsø

Posted on

TIL: curl has a config file?

I was last week days old when I discovered that curl can use configuration files.

So for now I have created a basic one. Placed in a default place for consumption on all uses.

  • $XDG_CONFIG_HOME/.curlrc
# Documentation:
# - https://everything.curl.dev/cmdline/configfile.html
#

# Follow redirects
--location

# Suppress progress meter, set to off to disable, it conflicts with jq processing
# which I do a lot, I do not download a lot a do not need a progress meter
--no-progress-meter

# verbose output also conflicts with jq
--silent
Enter fullscreen mode Exit fullscreen mode

Now you can and will get into a situation where you do not want to use your regular configuration, then you need to add all of the flags on the command line or add another config file, perhaps local to your project.

To get around my configuration I need to do:

  • --no-location
  • --progress-meter

Unfortunately curl does not seem to have an option to ignore the config files and it seems to stack the options.

Resources and References

Lifted from my TIL collection

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

If this article connected with you, consider tapping ❤️ or leaving a brief comment to share your thoughts!

Okay