nsHTTPConn *conn = new nsHTTPConn(szUrl); if(conn == NULL) return(WIZ_OUT_OF_MEMORY);
if((szProxyServer != NULL) && (szProxyPort != NULL) && (*szProxyServer != '\0') && (*szProxyPort != '\0')) {  memset(proxyURL, 0, sizeof(proxyURL)); wsprintf(proxyURL, "http:  conn = new nsHTTPConn(proxyURL); if(conn == NULL) return(WIZ_OUT_OF_MEMORY);  if((szProxyUser != NULL) && (*szProxyUser != '\0') && (szProxyPasswd != NULL) && (*szProxyPasswd != '\0')) /* detected user and password info */ conn->SetProxyInfo(szUrl, szProxyUser, szProxyPasswd); else conn->SetProxyInfo(szUrl, NULL, NULL); } else { /* no proxy information supplied. set up normal http object */ conn = new nsHTTPConn(szUrl); if(conn == NULL) return(WIZ_OUT_OF_MEMORY); }
int WGet(char *szUrl){  int rv;  nsHTTPConn *conn = new nsHTTPConn(szUrl);  if(conn == NULL)    return(WIZ_OUT_OF_MEMORY);    rv = conn->Open();  if(rv == WIZ_OK)  {    rv = conn->Get(NULL, NULL);    conn->Close();  }  if(conn)    delete(conn);  return(rv);}