Re: [Pharo-dev] Call a WebService with authentication
ZnClient new url: 'https://www.example.com'; username: 'myuser' password: 'mypwd'; get angelo.favero wrote
Hi, all.
I'm calling a web service with java using this java code to authenticate.
--------------------------------------------------------------------------------------------------------------------- Authenticator authenticator = new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { String user = "myuser"; String password = "mypwd"; System.out.println("Feeding username and password"); PasswordAuthentication auth = new PasswordAuthentication(user, password.toCharArray()); return auth; }}; Authenticator.setDefault(authenticator); --------------------------------------------------------------------------------------------------------------------
I'm looking for an example of smalltak code that does the same thing.
-- View this message in context: http://forum.world.st/Call-a-WebService-with-authentication-tp4885984p488601... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
participants (1)
-
Paul DeBruicker