Feature request/idea: configuration profiles

Dick Visser via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <CAF8BbLZz2Hj_ucD1G1DumW=fhWJqkuUA4TK1o1=wPBRhYP7GAA@mail.gmail.com>
Hi

Curl supports loading a custom configuration profile with the -K,
--config <file>.
But, this requires you to actually know and specify the exact location
of the config file. It also places restrictions on the name as it is a
file system path.
I was thinking about something like configuration profiles, where by
the configuration file would contains names sections that can then be
used by just providing the profile name.

for example the config could contain a section like this

[foo]
--follow
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
-H "Upgrade-Insecure-Requests: 1"
-H "Accept-Encoding: gzip, deflate, sdch"
-H "Accept-Language: en-US,en;q=0.8"

[code]
-s
-o
-w "%{http_code}\n"


Which would then be used by doing:

curl --profile foo https:/....

This means that all profiles are in a single file (arguably easier to
maintain, depending on the scenario of course), and that one only has
to remember profile names.

What do you think? Is this worth a github issue?

Thx!

Dick Visser
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.