/** * Creates a standard Apache HttpClient that is thread safe, supports different SSL auth methods * and basic authentication * * @param settings The server settings to adhere * @return An HttpClient that should be stored locally and reused for every new request * @throws DaemonException Thrown when information (such as username/password) is missing */ public static DefaultHttpClient createStandardHttpClient( DaemonSettings settings, boolean userBasicAuth) throws DaemonException { return createStandardHttpClient( userBasicAuth && settings.shouldUseAuthentication(), settings.getUsername(), settings.getPassword(), settings.getSslTrustAll(), settings.getSslTrustKey(), settings.getTimeoutInMilliseconds(), settings.getAddress(), settings.getPort()); }