[Webtest] Basic Authorization

Scot Hale webtest@lists.canoo.com
Thu, 20 Mar 2003 14:03:29 -0800


Hello,

I am trying to use the clicklink on a link that requires basic 
authorization.  I noticed that this doesn't work with canoo webtest.  This 
is the code that I can use to do it with :

WebRequest request = link.getRequest();
byte[] basicAuth =
com.sun.mail.util.BASE64EncoderStream.encode(("BASIC 
"+username+":"+password).getBytes());
request.setHeaderField("Authorization",new String(basicAuth));

I can write this part, but I am not sure how to add the attributes to the 
clicklink and invoke pieces.  Where in the code do I add the attributes? Or 
is there someone else that would like to add them?



Scot Hale



_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail