cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Newbie question about POST command using libcurl

From: Marc Hoersken <info_at_marc-hoersken.de>
Date: Sat, 14 Apr 2012 09:59:05 +0200

Hi Howard,

the header part you are trying to "modify" is not a POST field, but
the actual request path of the URL.

This means you have to set the option CURLOPT_URL to the full URL,
including the path, e.g.:
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTURL

Where curl.haxx.se is the domain, and /libcurl/c/curl_easy_setopt.html
the request path.

Best regards,
Marc

2012/4/13 Howard <howard_at_renci.org>:
> Hi all
>
> I hope this is the correct list for this question.  If not, please let me
> know which mailing list to use.
>
> I am using the c language libcurl API and I am trying to generate a POST
> header that looks like:
>
> POST /cmd/put HTTP/1.1
>
> So far I've not been able to figure out how to customize the POST header to
> add the "/cmd/put". I've tried using CURLOPT_POSTFIELDS, but that didn't
> seem to help.
>
> Any suggestions?
>
> Thanks much
> Howard
> --
> Howard Lander
> Senior Research Software Developer
> Renaissance Computing Institute (RENCI)
> The University of North Carolina at Chapel Hill
> Duke University
> North Carolina State University
> 100 Europa Drive
> Suite 540
> Chapel Hill, NC 27517
> 919-445-9651
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-14