How to set up custom header in curl config file

How can I add a parameter to set a custom header in curl config file? None of the following lines worked:

Header = 'x-abc: xyz'
header = 'x-abc: xyz'

      

+3


source to share


1 answer


-H:"x-abc: xyz"

works great:

curl -vvv -K headerfile  http://www.google.com -o /dev/null
* About to connect() to www.google.com port 80 (#0)
*   Trying 74.125.230.243...
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* connected
* Connected to www.google.com (74.125.230.243) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl
> Host: www.google.com
> Accept: */*
> x-abc: xyz

      



.....

+4


source







All Articles