curl-users
Re: per-file additional headers from CLI (for multipart POST, SOAP, etc.)
Date: Tue, 7 Mar 2017 21:14:52 +0100
On Tue, Mar 07, 2017 at 07:11:12PM +0000, Bill Mercer wrote:
> I think the link got broken by line wrap, here's a shortened version.
>
> http://tinyurl.com/jhanlf6
Please don't top-post.
> > 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-h
> > > eaders-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.
Yup, my guess was correct. The -X option is superfluous in this case, and for
reconstructing data sent, you might find --trace-ascii useful.
>>> Dan
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-07