[Httpunit-develop] is GetMethodWebRequest.getQueryString() meant to work?
Brought to you by:
russgold
From: David W. <dw...@pi...> - 2004-05-17 19:25:35
|
I am using the following code to set up my unit test:=20 =20 ServletRunner runner =3D new ServletRunner(); runner.registerServlet("/Endpoint", "org.mypackage.Endpoint"); =20 WebClient client =3D runner.newClient(); client.addCookie(COOKIE_NAME, "1234567890=3D=3D"); =20 String url =3D=20 formRequestURLWithQuery(DOMAIN_URL, EXTRA_STUFF); GetMethodWebRequest request =3D new GetMethodWebRequest(url); =20 When I run the following: WebResponse response =3D client.getResponse(request); =20 My servlet gets called, but when it uses getQueryString() it is returned a blank string (""). In addition, my reason for wanting the query string is that the parameters are position-dependant; from the looks of the HeaderOnlyWebRequest code and the UncheckedParameterHolder class, I will get an arbitrarily sorted list back, formed into a query string. =20 How is this supposed to work? Am I meant to override WebRequestSource in some manner? =20 -David Waite |