HttpUrlConnection's and Proxies
I'm trying to sort out an app where I have to go thru a web proxy with user authenication in order to access a web.
Can anyone provide some ideas as to how to do this? HttpUrlConnection allows u to specify if u're going thru a proxy, but seemingly vague on how to enter/specify user id/password?
[318 byte] By [
fuzzybr] at [2007-9-26 4:20:31]

Ok no one replied - let me povide details:
Well I'm (or my client) is connected to a LAN that has to go thru a proxy to access the web.
Assuming the proxy is http://proxy.foo.bar:8000
and his username and password authenication required is
username:foo
password: bar
how do I use httpurlconnection (or other means) to access the web by providing this info. Futhermore, is there a way to tweak it so that the user enters his username and password when its required?
I really appreciate an answer. Deadline running closer =)
hi,
usually basic http authentication works like this:
http://foo:bar@proxy.foo.bar:8080/
however, I don't think that the proxy uses this type of authentication and therefore you will need to use sockets. The latter is not my favorite section of Java and so I cannot give further hints. Hope this helped though.
best regards, Michael