cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Newbie question about POST command using libcurl

From: Howard <howard_at_renci.org>
Date: Mon, 16 Apr 2012 08:33:08 -0400

Hi Marc

Thanks for the response, which for future reference, is correct. As
soon as I realized this, I felt kind of dumb, but I did say it was a
newbie question!

Howard

On 4/14/12 3:59 AM, Marc Hoersken wrote:
> 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

-- 
Howard Lander <mailto:howard_at_renci.org>
Senior Research Software Developer
Renaissance Computing Institute (RENCI) <http://www.renci.org>
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
Received on 2012-04-16