Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setRequestProperty()

 
Ram Jeevi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
setRequestProperty(String key, String value) is the basic definition of this method.
But in my program i am not clear with the key and value assigned to it. The program is,

URL url = new URL("http://www.google.com/");
URLConnection con = url.openConnection();

con.setRequestProperty("Proxy-Authorization","Basic " + new sun.misc.BASE64Encoder().encode( (proxyUser + ":" + proxyPassword).getBytes()));


Please some one help me to understand the above line.
thanks in advance.
 
Henry Wong
author
Marshal
Pie
Posts: 21123
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
con.setRequestProperty("Proxy-Authorization","Basic " + new sun.misc.BASE64Encoder().encode( (proxyUser + ":" + proxyPassword).getBytes()));


This is merely a compound statement -- perhaps it could be bettter understood if you broke it apart...



Henry
 
Ram Jeevi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic