hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Smith <ryan.justin.sm...@gmail.com>
Subject Re: How to get httpclient to throw exception when authentication fail
Date Mon, 10 Jan 2011 17:26:55 GMT
You could try checking the status code and throw a custom exception when
status code = 401.

hth.

On Mon, Jan 10, 2011 at 12:04 PM, Dan Tran <dantran@gmail.com> wrote:

>
>
> Hi every one,
>
> I am quite new to HttpClient, and have spent and couple of days try to get
> HttpClient to send a http request to one my remote device.  In the return,
> the http response is a soap content.
>
> However, when user/password are incorrect, i get back a faul soap response.
> But What I need is an exception.
>
> I went thru tutorial several times and could not find a obvious way to make
> this happen.
>
> Could you help?  Perhaps I miss setting up a httpclient/httpget's
> configuration?
>
> Big thanks
>
> -Dan
> --
> View this message in context:
> http://old.nabble.com/How-to-get-httpclient-to-throw-exception-when-authentication-fail-tp30635600p30635600.html
> Sent from the HttpClient-User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message