Re: Getting Statuscode from WebResponse

"Tim Diggins (Subs)" <[email protected]>
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <[email protected]>
Are you looking for something more than response.getResponseCode()?
note that by default some responseCodes (not 2xx - AFAIK  -  4xx and 5xx)
result in exceptions thrown - though you can turn this off (with
ServletUnitClient.setExceptionsThrownOnErrorStatus(false) for example)

hth

Tim

On 22 Dec 2007, at 17:59, Mark Rambow wrote:

Hi,

first of all thanks for developing HTTPUnit.

Is there a way to get the statuscode (e.g 203) of a WebResponse?
I use HTTPUnit to test RESTful Web Services and asserting a special
statuscode is one requirement.

Is there maybe a way to overwrite a class to get these code?
I have already overwritten the GetRequest to have a DELETE-Method.

Cheers
Mark

-- 
Dipl.-Inform.(FH) Mark Rambow

Tel.: (+49) 179 / 5110 982
E-Mail: markrambow@googlemail.com-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.