I have been using httpunit for quite a while to test my servlets. These servlets deal with binary data and have nothing to do with HTML. One thing that I have always had to work around is that PostMethodWebRequest does not encode the request parameters in the URL query string.
I understand why PostMethodWebRequest does this, it's so that it complies with the HTML 4.01 standard, section 17.13 Form Submission http://www.w3.org/TR/html4/interact/forms.html#submit-format.
However, when interacting with servlets that do not handle HTML it would be convenient if I could tell PostMethodWebRequest that it is not dealing with HTML form data and so it can then encode the request parameters in the URL query string.
Please find a patch attached that makes this possible. This applies to the trunk of httpunit as of 2011-04-09.
Log in to post a comment.