You can use Authenticator with HttpUrlConnection:
http://java.sun.com/j2se/1.5.0/docs/api/java/net/Authenticator.html

Hope that helps,
- John

On Mar 24, 9:12 am, "nEx.Software" <justin.shapc...@gmail.com> wrote:
> I am beating my head against a wall trying to figure out why I cannot
> get Authenticated on my server whilst using HttpUrlConnection. I need
> to post a file in a post method and it seems I cannot do so with the
> DefaultHttpClient and a regular HttpPost (unless I am completely
> missing something?). I can get DefaultHttpClient to authenticate just
> fine using setCredentials() but the same doesn't exist for
> HttpUrlConnection so I try to set through setRequestProperty:
> conn.setRequestProperty("Authorization", "Basic " +
> Base64EncodedUserNamePassword); to no avail. Can anyone offer some
> insight? Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to