curl :: MyHttpFetcher :: defaultinit
# Custom delegate to receive callbacks from a Curl transfer
class MyHttpFetcher
super CurlCallbacks
# Body of the downloaded file
var fetched_body = ""
redef fun header_callback(line) do
# We keep this callback silent for testing purposes
#if not line.has_prefix("Date:") then print "Header_callback: {line}"
end
redef fun body_callback(line) do self.fetched_body += line
redef fun stream_callback(buffer) do print "Stream_callback: {buffer}"
end
lib/curl/examples/curl_http.nit:22,1--37,3