hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nolla...@gmx.de
Subject httpclient does not work for https via user/ password
Date Mon, 24 Jan 2005 14:43:32 GMT
hi

i just started working with the httpclient... everything worked fine until i
tried to execute a "GetMethod" via https and user/ password
authentication... this one doesn't. :(

what properties do i have to change? i guess, there are different
possibilities to use AuthScope... but what is the right one? manually (via
browser), the login works with the applied parameters...

>>>
        HttpClient client = new HttpClient();
    
        client.getState().setCredentials(
            new AuthScope("www.someurl.com/sub", 443, "realm"),
            new UsernamePasswordCredentials("user", "password")
        );
    
        GetMethod get = new GetMethod("https://www.someurl.com/sub");
    
        get.setDoAuthentication( true );
<<<

thanks + cheers 

christian

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message