+ // Print the contents type and file size
+ wxLogMessage("Contents type: %s\nFile size: %i\nStarting to download...",
+ url.GetProtocol().GetContentType(),
+ data->GetSize());
+
+ // Get the data
+ wxStringOutputStream sout;
+ if ( data->Read(sout).GetLastError() != wxSTREAM_EOF )
+ wxLogError("Error reading the input stream.");
+
+ wxLogMessage("Text retrieved from URL \"%s\" follows:\n%s",
+ urlname, sout.GetString());