0

I have a curl config file that I'm calling with -k and it works fine;

url = "http://some-url"
header = "Content-Type: text/xml; charset=utf-8"
silent
show-error

The problem is I want to add a second hesder item for a specific specific SOAP action (SOAPAction: urn:....) and I can't seem to get the syntax right. I've tried this and lots of other variation!;

header = "Content-Type: text/xml; charset=utf-8, SOAPAction: 
urn:IProductsService/HAL_DiscountUpdate"

but this doesn't work. I've also tried the advice here; how do I set a custom header in a curl config file and that doesn't seem to work either.

Have I missed something?

I can get;

curl -v -H 'SOAPAction: urn:MySOAPACTION' --config my_curl.cfg

to work fine but I really need it to be in the config file.

Thanks.

Mark Beynon
  • 265
  • 1
  • 3
  • 19

1 Answers1

0

Just add one more header = line for each new header you want to add. To extend your config file from the question to also pass on your shoe size:

url = "http://some-url"
header = "Content-Type: text/xml; charset=utf-8"
header = "Shoe-size: 10"
silent
show-error
Daniel Stenberg
  • 54,736
  • 17
  • 146
  • 222