U++ framework
Do not panic. Ask here before giving up.

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 Go to previous message
deep is currently offline  deep
Messages: 281
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
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: FtpClient heap leak
Next Topic: Can't use MT to capture console output
Goto Forum:
  


Current Time: Wed Oct 14 03:14:07 GMT+2 2026

Total time taken to generate the page: 0.01026 seconds