Buy commercial curl support. We
help you work out your issues, debug your libcurl applications, use the API,
port to new platforms, add new features and more. With a team lead by the
curl founder Daniel himself.
Feature request/idea: configuration profiles
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Dick Visser via curl-users <curl-users_at_lists.haxx.se>
Date: Fri, 10 May 2024 09:41:03 +0200
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
Date: Fri, 10 May 2024 09:41:03 +0200
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.htmlReceived on 2024-05-10