Bob Lee wrote:
On Fri, Jun 20, 2008 at 4:16 PM, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:
I _really_, _really_ like this idea. However, what shall HttpClient do if
it gets status code other than 200? Throw an exception? Ignore the status
code?
We could pass a response to the handler in all the same cases where we
return a response today. If the user wants to add some handling of non-200
codes, they could decorate their handler. Now, I suppose I'm overlapping w/
the response interceptor support. I'll take a closer look at the API.
Bob
Coming to think of it, It seems perfectly okay to leave this decision up
to the individual handlers. Simple handlers might just thrown an
exception on all status codes but 200. More complex ones such as SOAP
handler could handle 500 status codes if the message contains an SOAP fault.
Want to put together a patch? ;-)
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]