File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes java httpclient print HTTP Headers Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "java httpclient print HTTP Headers" Watch "java httpclient print HTTP Headers" New topic
Author

java httpclient print HTTP Headers

tech king
Greenhorn

Joined: Nov 24, 2009
Posts: 1
HI all,
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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35223
    
    7
The org.apache.commons.httpclient.HttpMethod interface -which is implemented by GetMethod, PostMethod, etc.- has several methods that let you examine the request headers.


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java httpclient print HTTP Headers
 
Similar Threads
difference between request and response headers
Sending custom http headers through HttpClient
How to set custom HTTP header for single sign on
HTTPClient
Upload / Post files to webserver through HTTP protocol