i am using HTTP Client to send basic HTTP ( GET POST PUT DELETE) Requests to webserver.
But sometimes i make mistake in passing the request correctly. Hence i decided to print the HTTP Request HEADERS before sending the request to the webserver.
I do not know how to print the request HTTP headers. I also referred " http://hc.apache.org/httpclient-3.x/tutorial.html " tutorial, but could not find anything.
So has anyone written such a code
posted 6 years ago
The org.apache.commons.httpclient.HttpMethod interface -which is implemented by GetMethod, PostMethod, etc.- has several methods that let you examine the request headers.