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
HTTPREQUEST using Proxy not working -- SOLVED [message #61716] Sat, 28 June 2025 17:04 Go to previous message
deep is currently offline  deep
Messages: 272
Registered: July 2011
Location: Bangalore
Experienced Member
Hi

I want to connect to internet via proxy. Checked on Win11. UPP build 17953.
Code I am using. Compiled with Core and Core/SSL packages.

#include <Core/Core.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.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);
}


With Trace on log

HTTP START
Using proxy http://192.168.1.1:3128
Starting status 2 'Resolving host name', url: restcountries.com
HTTP Execute: Resolving host name
HTTP StartConnect
HTTP retry on error connect: not found
Starting status 1 'Start', url: restcountries.com
HTTP Execute: Start
HTTP START
Using proxy http://192.168.1.1:3128
Starting status 2 'Resolving host name', url: restcountries.com
HTTP Execute: Resolving host name
HTTP StartConnect
HTTP retry on error connect: not found


Request help


Warm Regards

Deepak

[Updated on: Mon, 30 June 2025 11:42]

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: Fri Jul 04 15:00:37 CEST 2025

Total time taken to generate the page: 0.03929 seconds