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 » Community » Newbie corner » print the Http Request before sending it
print the Http Request before sending it [message #50319] Tue, 18 September 2018 15:44 Go to next message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
Hello Everyone,

I'm looking for a way to show the request of HttpRequest object before Execute it.

#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{

	HttpRequest test("http://www.holidaywebservice.com//HolidayService_v2/HolidayService2.asmx?wsdl");
	test.Post("<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:hs='http://www.holidaywebservice.com/HolidayService_v2/'><soapenv:Body><hs:GetHolidaysForMonth><hs:year>2018</hs:year><hs:countryCode>UnitedStates</hs:countryCode><hs:month>11</hs:month></hs:GetHolidaysForMonth></soapenv:Body></soapenv:Envelope>");
	Cout() << test.MyRequestAtString();  //Looking for something like that !
	Cout() << test.Execute();
	test.Close();
	
}


It will help me to determine why I have no response.

Thanks in advance !
Re: print the Http Request before sending it [message #50329 is a reply to message #50319] Mon, 24 September 2018 11:37 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Activate tracing into the log


CONSOLE_APP_MAIN
{
	StdLogSetup(LOG_COUT|LOG_FILE);
	HttpRequest::Trace();


(LOG_COUT there will output the log into console too).

Note that you can access the log by pressing Alt+L.

Mirek
Re: print the Http Request before sending it [message #50331 is a reply to message #50319] Mon, 24 September 2018 15:05 Go to previous message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
Thank you Mirek, I will try ! Razz

have good day !
Previous Topic: HttpRequest and SOAP protocole
Next Topic: Adding a socket to a GUI application
Goto Forum:
  


Current Time: Thu Apr 18 20:10:42 CEST 2024

Total time taken to generate the page: 0.83105 seconds