curl-users
Re: per-file additional headers from CLI (for multipart POST, SOAP, etc.)
Date: Mon, 6 Mar 2017 23:33:27 +0100
On Tue, Mar 07, 2017 at 12:01:20AM +0300, radiomaster_at_freemail.ru wrote:
> Dear Programmers,
> I need help with CURL:
> In short, i need to add some custom headers, different for each file in same
> request, using Command-line interface only.
> Full text of my task is here:
> http://stackoverflow.com/questions/42150060/curl-per-file-additional-headers-from-cli-for-multipart-post-soap-etc
> I post it about a month ago, but still no luck.
> I very welcome answers at both here or at Stackoverflow.
That link isn't working for me, but I'm guessing you're not looking for the -H
option. If you want custom headers in each multipart/form-data section you can
do that with the CURLFORM_CONTENTHEADER option to curl_formadd(), but that's not
exposed by the command-line tool. You would need to generate the multipart
form body yourself and send it as a raw POST body, which isn't very convenient.
>>> Dan
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-06