proxy auth - still getting 407 after passing username/password
Hi,
I am having trouble access url via our proxy. I have read/tried all the examples but still nothing. However java webstart can connect.
1. proxy is Microsoft
2. base64Encoder from com.orielly.server package
here is the code:
try {
URL url = new URL("http", "someproxy", 80, "someurl");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
String proxyPassword = "DOMAIN\\username:password";
String encoded = Base64Encoder.encode(proxyPassword.getBytes());
conn.setRequestProperty("Proxy-Authorization","Basic "+encoded);
conn.connect();
System.out.print( conn.getResponseCode() );
}
catch( Exception e ) {
System.out.print( e ) ;
}
when I run this I get 407 code.
any help/pointers will be appreciated
Thanks

