I am using http client 2.0 I have managed to use the NTCredentials to successfully authenticate with an NTLM proxy, by providing the credentials to the HttpState
Credentials proxyCred = new NTCredentials(loggedInUserName,userPassword,"",domainName); client.getState().setProxyCredentials(null,proxyCred); This is all very well where I know for sure that there is an NTLM proxy in place, and I can prompt the user for their Windows logon details, and provide an instance of a Credentials object which is an NTCredentials. My application, however, needs to cater for various environments, where there may be no proxies, proxies authenticating by IP address, proxies using Basic authentication etc etc. Is it possible for httpclient to inform its caller when it encounters a challenge, and to indicate what type of challenge it is. The caller can then decide which type of Credentials object to supply to the state? I don't know if what I am asking for exists, or if it is a new feature. Hopefully the former. Any comments would be appreciated. Thanks, Brian. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]