- if (!datas)
- wxMessageBox("Error in getting data from the URL.", "Alert !");
- else {
- wxMessageBox("Success !! Click on OK to see the text.", "OK");
+ if (!datas) {
+ wxString error;
+ error.Printf(_T("Error in getting data from the URL. (error = %d)"), url.GetError());
+ wxMessageBox(error, "Alert !");
+ } else {
+ wxFileOutputStream *str_out = new wxFileOutputStream("test.url");
+ str_out->Write(*datas);
+
+ wxMessageBox(_T("Success !! Click on OK to see the text."), "OK");