public void setUserAgent(String agentString) {
        if (agentString == null) {
            this.getHttpClient().getParams().removeParameter(AllClientPNames.USER_AGENT);
        } else {
            this.getHttpClient().getParams()
                    .setParameter(AllClientPNames.USER_AGENT, agentString);
        }
    }