Hello, use HttpMethod.setDoAuthentication(false). Then, your application will get the 40x response directly and can check the returned headers for the auth scheme and parameters. If it's basic auth, you should enable preemptive authentication after providing the credentials, to avoid unnecessary round trips.
If you are using the development version of HttpClient, it's even simpler. Implement the interface ...auth.CredentialsProvider and all the information you require will be passed in as method arguments to getCredentials() cheers, Roland mclovis <[EMAIL PROTECTED]> 19.03.2004 15:01 Please respond to "Commons HttpClient Project" To: Jakarta Commons HttpClient mailing list <[EMAIL PROTECTED]> cc: Subject: Repost: Authentication question In 2.0 release is there a way to find (query) the server to get the authentication scheme in order to know what Credentials to use? I an new at this and would appreciate any help. Thanks in advance. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]