curl_easy_reset(m_pCurl);
curl_easy_setopt(m_pCurl, CURLOPT_USERAGENT, "XXX/1.0");
curl_easy_setopt(m_pCurl, CURLOPT_URL, request.url.c_str());
curl_easy_setopt(m_pCurl, CURLOPT_HEADERDATA , this);
curl_easy_setopt(m_pCurl, CURLOPT_HEADERFUNCTION, HeaderCallback);
curl_easy_setopt(m_pCurl, CURLOPT_WRITEDATA, this);
curl_easy_setopt(m_pCurl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(m_pCurl, CURLOPT_FOLLOWLOCATION, true);
curl_easy_setopt(m_pCurl, CURLOPT_TIMEOUT, 60*60L); // 1 hour
curl_easy_setopt(m_pCurl, CURLOPT_LOW_SPEED_LIMIT, 1L);
curl_easy_setopt(m_pCurl, CURLOPT_LOW_SPEED_TIME, 90L);
#ifdef DEBUG
curl_easy_setopt(m_pCurl, CURLOPT_VERBOSE, 1L);
#endif
m_curlCode = curl_easy_perform(m_pCurl);