cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: post data in a chunk to http server and also receive data from there to a chunk

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 11 Sep 2003 08:46:09 +0200 (CEST)

On Wed, 10 Sep 2003, Jerry G. Chiuan wrote:

> I am rookie in libcurl and would like to ask a simple question: how can I
> post data in a chunk to http server and then receive response data from
> there to a chunk I know we have curl_easy_perform( ), but it only transfers
> file I think

Did you read the docs and the examples? I don't think there's much in there
that tricks you into believing libcurl only supports posting of files.

Try reading up on CURLOPT_POSTFIELDS and family. You can also set CURLOPT_POST
to true and then set CURLOPT_READFUNCTION to have your callback called for
each chunk to send off.

Receiving data? Try CURLOPT_WRITEFUNCTION.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-11