GeeCON Prague 2014*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Testing HTTP methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Testing HTTP methods" Watch "Testing HTTP methods" New topic
Author

Testing HTTP methods

Sergey Tyulkin
Ranch Hand

Joined: May 10, 2005
Posts: 87
Could someone give me an example of software for testing HTTP methods?
I want to construct the request (including the name of the HTTP method) by hand and get the response from the web server with all accompanying infomration, such as headers.
amit taneja
Ranch Hand

Joined: Mar 14, 2003
Posts: 810
you can use TRACE method to know what the info is comming to server

correct me if wrong and if it works successfully then pls put the code here


Thanks and Regards, Amit Taneja
Alexandre Cervieri
Greenhorn

Joined: Aug 02, 2005
Posts: 27
Hi, I've heard about HTTPUnit but I've never used it. It is supposed to be a kind of JUnit for HTTP, I don't know if it is really useful.
Mat Williams
Ranch Hand

Joined: Jul 20, 2005
Posts: 215
Hi,

I have written a small mulit threaded java app, that through some config parameters listens on a given port and after logging the request passes it through to the server and then logs the server response on the way back.

If this is the sort of thing you are looking for I will try and dig it up. I wrote it when I was learning java and haven't used it for at least 3 years so I am not sure where it is and will probably be scared when looking at the code, but am happy to pass it on if it is the sort of thing you are wanting.

post a reply and I can email it to you off list (after I have found it).

Mat
Sergey Tyulkin
Ranch Hand

Joined: May 10, 2005
Posts: 87
Mat, I want slightly more Something like a small program with GUI, that lets me set destination resource (servlet or jsp page address), http method, client headers, HTTP body; then send this information to the server and receive response as is.
Anyway, thanks!

Will try to find myself...
Aruneesh Salhotra
Ranch Hand

Joined: May 12, 2004
Posts: 167
U can use CURL, which works well with the non-SSL connections. (https).
It is both command line as well as GUI based.
Sergey Tyulkin
Ranch Hand

Joined: May 10, 2005
Posts: 87
Thank you, Aruneesh!
I downloaded CURL, will look at it later today
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42046
    
  64
Go with Alexandre's suggestion and give HttpUnit a try. It's easy to set up and use, and you can simulate and test form submission, retrieval of results, setting of new parameters etc. Very useful piece of software.


Ping & DNS - my free Android networking tools app
 
GeeCON Prague 2014
 
subject: Testing HTTP methods