Home » U++ Library support » U++ MT-multithreading and servers » HTTPREQUEST using Proxy not working -- SOLVED
Re: HTTPREQUEST using Proxy not working -- SOLVED [message #61720 is a reply to message #61719] |
Mon, 30 June 2025 11:37  |
 |
deep
Messages: 272 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
It is little strange but working
I added just to check with giving both Proxy and SSLProxy parameters. It is working only when both are assigned.
#include <Core/Core.h>
#include <Core/SSL/SSL.h>
using namespace Upp;
CONSOLE_APP_MAIN {
HttpRequest http(
"https://restcountries.com/v3.1/name/germany?fullText=true&fields=name,capital");
http.SSLProxy("http://192.168.1.1",3128);
http.SSLProxyAuth("username","password");
http.Proxy("http://192.168.1.1",3128); <<<===
http.ProxyAuth("username","password"); <<<===
http.Trace(true);
auto content = http.Method(HttpRequest::METHOD_GET).Execute();
if(content.IsVoid()) {
Cout() << "Failed to execute GET request with error code " << http.GetStatusCode()
<< ".\n";
return;
}
DUMP(content);
}
Warm Regards
Deepak
|
|
|
Goto Forum:
Current Time: Sat Jul 05 04:08:49 CEST 2025
Total time taken to generate the page: 0.03241 seconds
|