public B setBasicAuth ( final String username , final String password ) { String auth = Base64 . encodeToString ( ( username + ":" + password ) . getBytes ( ) , Base64 . NO_WRAP ) ; httpParams . addHeader ( "Authorization" , "Basic " + auth ) ; return self ( ) ; }
Sets the HTTP Basic Authentication header .