Curl.onReceiveHeader

The event handler that receives incoming headers for protocols that uses headers.

struct Curl
@property
void
onReceiveHeader
(
void delegate
(
in char[]
)
callback
)

Parameters

callback void delegate
(
in char[]
)

the callback that receives the header string. Make sure the callback copies the incoming params if it needs to store it because they are references into the backend and may very likely change.

Examples

import std.net.curl, std.stdio;
Curl curl;
curl.initialize();
curl.set(CurlOption.url, "http://dlang.org");
curl.onReceiveHeader = (in char[] header) { writeln(header); };
curl.perform();

Meta