cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: echo to function curl_easy_perform

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 9 Dec 2008 23:04:48 +0100 (CET)

On Tue, 9 Dec 2008, Joe Baldwin wrote:

> I took an example from the libcurl package download that I modified to make
> some tests.

Then consider the curl-library list instead!

> The original program was "post-callback.c". My modified version is:

> pooh.sizeleft = strlen(data);

> curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "DATA=0001");

> curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, pooh.sizeleft);

This combo looks wrong to me.

> When the curl_easy_perform function is executed, the data received from the
> HTTP server is displayed in my cmd window.

http://curl.haxx.se/docs/faq.html#How_do_I_prevent_libcurl_from_wr

> I also receive the content of the answer in pooh variable.

No you don't. That variable is used for the READFUNCTION which in your case
isn't even used.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2008-12-09