Menu

#171 Option to not throw an exception on 4xx and 5xx response cod

closed
nobody
None
5
2008-05-02
2008-05-02
No

I'm testing a REST API, and it, in that context, throwing an exception for certain HTTP response codes and not for others doesn't make sense and complicates my test case design. This is related to 914314, however I would like to have complete access to the response and not have to ever catch HttpException. I realize this would have to be an optional thing.

I'm happy to submit a patch, however it's not clear to me how to best provide this optional configuration. Should it be a system property, a parameter to WebClient/WebConversation, or what?

Discussion

  • Dave Copeland

    Dave Copeland - 2008-05-02

    Logged In: YES
    user_id=751883
    Originator: YES

    ok, nevermind. HttpUnitOptions isn't in the javadoc for some reason, but it seems that the features are there in SVN at least.

     
  • Dave Copeland

    Dave Copeland - 2008-05-02
    • status: open --> closed
     

Log in to post a comment.