Curl : Read headers from a file and use them in a cURL command
0
votes
3
answers
16143
views
I have a bash script with the following curl command :
curl -v -X GET https://example.com -H ~/Desktop/headers.txt -o ~/Desktop/file.txt
When i run the bash script i am getting unothorized 401. Obviously i am not reading the header file correctly. My header file looks like that "Authorization: Bearer 40bsafsdgds34234....". My curl version is 7.26
Asked by Thanos M
(183 rep)
Sep 28, 2018, 01:38 PM
Last activity: Apr 22, 2025, 03:34 PM
Last activity: Apr 22, 2025, 03:34 PM