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