public T basic ( String user , String password ) { connection . setRequestProperty ( "Authorization" , "Basic " + toBase64 ( ( user + ":" + password ) . getBytes ( ) ) ) ; return ( T ) this ; }
Sets a user and password for basic authentication .