slobak - 2005-06-15

Hello -

I've been using httpunit for testing and so far I've found it very useful. Thanks to the developers and all those that have contributed, it's an excellent and easy-to-use product.

I have found some issues with the API that I would like to see addressed. I'm happy to address them myself and contribute the changes back if that's the preferred practice.

1) The WebClient cannot be easily extended

We are given the ability to "provide our own" WebClient, and this is actually a very useful feature. We want our client to munge the URLs in some interesting ways and handle SSL slightly differently, for example, but for all other intents and purposes behave as the standard WebClient. Unfortunately, in reality the extension API isn't adequate to do this properly.

WebClient can be extended, and in theory you just need to override the newResponse(.) method to do what you want .. but all of the methods the existing newResponse(.) calls (including instantiating the entire HttpWebResponse class) are either private or package private, so there's no way to get at them. It would be nice if some more of these things were made public so they could be used.

2) NodeUtils seems to have an array of extremely useful functions for inspecting the DOM - why is this not public?

If these issues are due to oversight, I'd be happy to make the necessary changes to publicize more of the API. If this is on purpose, I'm curious to hear the rationale.

Thanks ..