curl-library
Re: no output wanted (resend)
Date: Thu, 05 Jul 2012 18:26:25 +0200
Daniel Stenberg, 05.07.2012 16:12:
>> is there a simple way to make curl_easy_perform() not to output any
>> data? I just want to HTTP-POST something to a web interface and are
>> not interested in the server's reply.
> I read that as you want to stop receiving data and not just not output it?
Oh, no, I do want to receive the server's reply (or at least the HTTP
code), I just don't want curl output the data on the console (stdout or
stderr). The server's reply is only a single line, so there's no harm in
reading that from the network.
If there's currently no simple way to do that, may I propose that make
that possible? E.g. by calling the write function only if it is set to a
custom func or the file handle being not NULL. As far as I see the write
function is only called at one place, so that should be fairly simple.
The attached patch does just that (untested, though).
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- text/x-patch attachment: noout.diff