Home » U++ Library support » U++ MT-multithreading and servers » HttpRequest - desktop client U++ (accessing java tomcat server)
HttpRequest - desktop client U++ (accessing java tomcat server) [message #60087] |
Sat, 12 August 2023 02:04 |
BetoValle
Messages: 203 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
Hi,
I have a web application running on a vps server with java tomcat for a year without problems, using SSL certificate.
There was a need to expand and access via client desktop and tried using U++. I succeeded only on my machine performing tests, but with address localhost "http://localhost" but no certificate.
When I went to test the vps (since a few months ago) No somehow managed! in the url I did exactly, as my local machine but prefixed with https and nothing.
Only today, when I saw this post on the forum
https:// www.ultimatepp.org/forums/index.php?t=msg&th=10929&g oto=53089&#msg_53089
I finally succeeded and solved it!!
The package had to be added package to the app and #include <Core/SSL/SSL.h>
So I suggest that in the httpRequest documentation of U++ this gets a lot of attention "as if forcing" the user to add
said package (when it comes to SSL) precisely in order not to waste time and effective clarification.
HttpRequest http("https://myaddress.com.br:8443/XXX/YYY");
http.POST();
http.Post("cad", "GetAlgo");
http.Post("myx", "abc");
http.Post("myz", "*");
http.ContentType("charset=UTF-8");
http.ContentType("application/x-www-form-urlencoded");
String sr = http.Execute();
Cout() << "conteudo " << http.GetContent() << EOL;
Value v = ParseJSON(~sr);
Cout() << "string retornado: " << sr << EOL;
Cout() << "value: " << v << EOL;
Thanks / Oblivion / Forlano
|
|
|
Goto Forum:
Current Time: Wed Jun 05 08:06:52 CEST 2024
Total time taken to generate the page: 0.02141 seconds
|