wink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulo Borges <>
Subject Adding Authorization to http header using RestClient
Date Sun, 06 Jun 2010 22:18:14 GMT


Our wink rest application is using container security (in Websphere). Basically any attempt
to access a resource is required to have an id and password. Normally in using java native
URL api, I use the following code to authenticate a user [say id mack and pwd wink4you] to

String authorization = "mack:wink4you";
BASE64Encoder encoder = new sun.misc.BASE64Encoder();
URL url = new URL("http://localhost:9080/....");
HttpURLConnection urlc = (HttpURLConnection) url.openConnection();            
urlc.setRequestProperty("Authorization", "Basic "+ encoder.encode(authorization));

is there a way to achieve the above result using wink client api.
MSN Dating: Find someone special. Start now.
View raw message