i am using libcurl to do HTTP request.
The request goes through authenticated proxy.
Below are my settings with regards to proxy
curlResultCode = curl_easy_setopt(curlHandle, CURLOPT_PROXY, <proxy-server>);
curlResultCode = curl_easy_setopt(curlHandle, CURLOPT_PROXYPORT, <port number>);
//curlResultCode = curl_easy_setopt(curlHandle, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
OR
curlResultCode = curl_easy_setopt(curlHandle, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
I cannot give user name and password for the proxy as i expect CURL to intelligently find it like how "winhttp" interface does.
I have tried both ANY and NTLM. However, at times the request goes through successfully through the proxy. At times i am getting "Authentication required: 407" during the easy perform.
Can someone tell me what i have done wrong here to see this random behavior?
Thanks for reading!!!