cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem with GET

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 18 Jul 2007 17:06:31 -0700

On Wed, Jul 18, 2007 at 04:16:48PM -0700, James Woo wrote:
> curl_global_init(CURL_GLOBAL_ALL);
> ctx = curl_easy_init();
> curl_easy_setopt (ctx, CURLOPT_WRITEFUNCTION, write_callback);
> curl_easy_setopt (ctx, CURLOPT_URL, "http://172.30.2.164/xxx/yyy/");
> curl_easy_perform (ctx);
>
> Got my first web page in the write_callback function.
>
> curl_easy_setopt (ctx, CURLOPT_READFUNCTION, read_callback);
> curl_easy_perform (ctx);
>
> Nothing happened.

Setting a read callback doesn't do anything magical to the request; it's
just going to do the same request again, and a GET doesn't need a read
callback function. You need to set up an upload of some sort--a POST,
PUT or something similar--if you want to supply data in a read callback.
Just what are you trying to do in your second request?

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-07-19