The Artima Developer Community
Sponsored Link

Web Buzz Forum
Java Tip: Basic Authentication with HttpURLConnection

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Angsuman Chakraborty

Posts: 19816
Nickname: angsuman
Registered: Dec, 2003

Angsuman Chakraborty is the CEO and Chief Architect at Taragana
Java Tip: Basic Authentication with HttpURLConnection Posted: Jul 6, 2007 1:02 AM
Reply to this message Reply

This post originated from an RSS feed registered with Web Buzz by Angsuman Chakraborty.
Original Post: Java Tip: Basic Authentication with HttpURLConnection
Feed Title: Simple Thoughts on Web Technologies
Feed URL: http://tech.gaeatimes.com/index.php/search/internet/feed/
Feed Description: News and views as a Software Architect and Entrepreneur on Web Technologies.
Latest Web Buzz Posts
Latest Web Buzz Posts by Angsuman Chakraborty
Latest Posts From Simple Thoughts on Web Technologies

Advertisement
Java provides a super simple, yet hidden from plain view, way to do basic authentication of HttpURLConnection / URLConnection. Before making a connection add the following lines of code: final String login ="..."; final String password ="..."; Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication (login, password.toCharArray()); [...]

Read: Java Tip: Basic Authentication with HttpURLConnection

Topic: Angsuman's Translator Plugin Pro / Gold: Application Program Interface Previous Topic   Next Topic Topic: How To Add Double-Dash / Hyphen in WordPress

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use