| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-library Mailing List Archives
[Q]: http proxy authorization using libcurl ?
From: <jskuo_at_cht.com.tw>
Date: Sat, 09 Aug 2003 19:28:13 +0800
Hi,
I'm a newbie to curl library.
I'm trying to use libcurl as a http client(GET).
My programming enviroment is: VC++ 6.0 SP5, stlport 4.5.3 on Windows
The libcurl is a great tool and I compiled it into a dll(set "using
It's also fine when I used the command-line version curl.exe in the dos-box.
It's fine when fetching pages in those sites behind my http proxy using
One point should be pointed out here, I've wriiten my programs in c++
When I issue these instructions in my program, te libcurl returned a
"Couldn't resolve proxy. The given proxy host could not be resolved." found in
string szTmp1(szProxy_ + ":" + szPort_);
However, when I change the above code to the following
It did connect to proxy host and did proxy authorization.
It seemed that I didn't submit correct username and password.
Is there anyone else who can help and give some suggestions ?
Best Regards,
James Kuo
//// a code snippet ///
::curl_easy_setopt(hCurl_, CURLOPT_FOLLOWLOCATION, 1);
::curl_easy_setopt(hCurl_, CURLOPT_URL, chUrl);//set url to get
::curl_easy_setopt(hCurl_, CURLOPT_VERBOSE, 1);
///proxy authorization
///case #1
//case #2
if (!szUser_.empty() && !szPasswd_.empty()) {
CURLcode res= ::curl_easy_perform(hCurl_);
cout << "returned code: " << res << endl;
-------------------------------------------------------
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info