std.net.curl - HTTP.Method.options - perform()

Johannes Pfau nospam at example.com
Fri Jul 27 11:12:05 PDT 2012


Am Fri, 27 Jul 2012 17:39:45 +0200
schrieb "David Eagen" <davideagen at mailinator.com>:

> 
> There must be a default onReceive that is writing that to stdout. 
> If I add this line just before the perform() call the output is 
> not generated:
> 
> http.onReceive = (ubyte[] data) { /+ drop +/ return data.length; 
> };
> 
> -David

I just had a quick look an this is not caused by the D interface. It's
the default behavior of libcurl if no explicit callback is set.

If desired we could add some code to the wrapper's initialize function
to automatically set this callback to a dummy function, but silently
dropping the data doesn't sound much better to me.

-------------
Set this option to NULL to get the internal default function. The
internal default function will write the data to the FILE * given with
CURLOPT_WRITEDATA.
-------------
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPT_WRITEFUNCTION

-------------
The internal CURLOPT_WRITEFUNCTION will write the data to the FILE *
given with this option, or to stdout if this option hasn't been set. 
-------------
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTWRITEDATA


More information about the Digitalmars-d mailing list