Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » HTTPREQUEST using Proxy not working -- SOLVED
Re: HTTPREQUEST using Proxy not working [message #61717 is a reply to message #61716] Sat, 28 June 2025 17:30 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1214
Registered: August 2007
Senior Contributor
Hello Deepak.

The SSL header is missing. You need to add it too.
I tested it with tinyproxy/localhost and it works fine:

#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("localhost",8888);
		http.SSLProxyAuth("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);
}



Best regards,
Oblivion


[Updated on: Sat, 28 June 2025 17:31]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Can't use MT to capture console output
Goto Forum:
  


Current Time: Tue Jul 08 09:51:19 CEST 2025

Total time taken to generate the page: 0.03371 seconds