@Override
  protected void configureHttpClient(HttpClient client) {
    super.configureHttpClient(client);
    if (isUseBearerTokenAuthentication()) {
      client.getParams().setAuthenticationPreemptive(true);
      client.getState().clearCredentials();
    }
    client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
  }
@Override
  protected void configureHttpClient(HttpClient client)