Capturing HTTP request header information sent by a HTTP client or browser
|Date:||7 August 2013|
|Product/Release:||LANSA Integrator - All Versions|
|Abstract:||How to capture HTTP request header information sent by a HTTP client or browser|
|Submitted By:||LANSA Technical Support|
At times application developers may need to capture HTTP request header information (tracing) sent by a HTTP client or browser.
The following suggestion is based on configuring the HTTP Server which is shipped with LANSA Integrator.
- In the system/httpd.xml file, enable tracing for catch all "/" match.
<match uri="/" class="com.lansa.jsm.JSMHTTPServiceFile" trace="true" clienttrace="false">
<parameter name="cache.maxage" value="0"/>
<parameter name="cache.maxage.pdf" value="0"/>
<parameter name="cache.maxage.image" value="0"/> </match>
- Direct your request to the JSM HTTP server and the HTTP request will be captured.
Any HTTP client request will be traced, the URI resources does need to exist. There won't be a need for any special program to capture the request as it is done by default.
Note: The POST content will not be traced, you will need to write your own JSMHTTPService class to write this to a file.