Hi,
Just had a thought.
I regularly find myself using curl with authorization bearer tokens.
However since I cannot use .netrc for bearer tokens,
I tried to find another solution to automatically add them without needing
to include them manually each time.
The idea is to potentially use a combination of curlrc + file based headers
with -H @file
The curlrc would include the a header with a {{ domain }} like variable
syntax.
Like:
header @path/{{domain}}.txt
Where the domain will be inferred by the given domain in the command.
Example:
curl --url "https://example.com" --header @curl/{{domain}}.txt
Where domain resolves to example.com automatically. Because then I could
put the --header arg into curlrc.
Alternatively, what if @file could link to a bashscript to make this
dynamic?
Although a bash script might have insane security implications I do not
forsee at the moment.
Thanks
Bastian
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette: https://curl.se/mail/etiquette.html