curl / Mailing Lists / curl-library / Single Mail


How to use libcurl with a config file?

From: Rich Megginson via curl-library <>
Date: Wed, 20 Mar 2019 10:47:17 -0600

I'm writing a C application (rsyslog) which uses libcurl and I would like to be able to pass in a lot of parameters to libcurl without having to implement support for every single option to
pass in separately to curl_easy_setopt().  The curl cli has a -K option which you can use to pass in a config file, but it doesn't look as though this is part of the public API, and there is
no option like CURLOPT_CONFIG_FILE for curl_easy_setopt().

Any suggestions?  I'm thinking to just copy/paste big chunks of src/tool_getparam.c and src/tool_operate.c

Received on 2019-03-20