cURL / Mailing Lists / curl-library / Single Mail


Re: HTTP PUT request, without a file.

From: Dan Fandrich <>
Date: Wed, 8 Aug 2007 23:59:47 -0700

On Thu, Aug 09, 2007 at 12:12:52AM -0500, Tom Bruno wrote:
> I am trying to use an http put request to update a profile on our server.
> All the documentation availabe only shows examples of how to http put from
> a FILE*. I however have a buffer in memory containing the string of data
> that needs to be sent.
> How would I go about doing this?

Set the pointer to your buffer (or a struct containing that pointer and
a length) using curl_easy_setopt(CURLOPT_PRIVATE,...), then set a simple
read callback function which uses that pointer to pass in the data when

>>> Dan

--              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-08-09