private WebClient buildWebClient() {
        // configure WebClientBuilder using ResteasyClientBuilder configuration

        // connectionTimeout -> ClientFactoryBuilder.connectTimeout
        // Value {@code 0} represents infinity. Negative values are not allowed.
        final long connectTimeout = delegate.getConnectionTimeout(TimeUnit.MILLISECONDS);
        if (connectTimeout > 0L) {
            clientFactoryBuilder.connectTimeoutMillis(connectTimeout);
        }

        // connectionTTL -> ClientFactoryBuilder.idleTimeout
        final long connectionIdleTimeout = delegate.getConnectionTTL(TimeUnit.MILLISECONDS);
        if (connectionIdleTimeout > 0L) {
            clientFactoryBuilder.idleTimeoutMillis(connectionIdleTimeout);
        }

        // defaultProxy -> ClientFactoryBuilder.proxyConfig(CONNECT)
        final String defaultProxyHost = delegate.getDefaultProxyHostname();
        if (defaultProxyHost != null) {
            final int defaultProxyPort = delegate.getDefaultProxyPort();
            final String defaultProxyScheme = delegate.getDefaultProxyScheme();
            final SessionProtocol proxyProtocol =
                    defaultProxyScheme == null ? SessionProtocol.HTTP
                                               : SessionProtocol.of(defaultProxyScheme);
            final InetSocketAddress defaultProxyAddress =
                    InetSocketAddress.createUnresolved(defaultProxyHost,
                                                       defaultProxyPort > 0 ? defaultProxyPort
                                                                            : proxyProtocol.defaultPort());
            clientFactoryBuilder.proxyConfig(ProxyConfig.connect(defaultProxyAddress, proxyProtocol.isTls()));
        }

        // trustManagerDisabled -> ClientFactoryBuilder.tlsNoVerify
        if (delegate.isTrustManagerDisabled()) {
            clientFactoryBuilder.tlsNoVerify();
        }
        // trustStore, keyStore -> ClientFactoryBuilder.tlsCustomizer
        final KeyStore trustStore = delegate.getTrustStore();
        final KeyStore keyStore = delegate.getKeyStore();
        if (trustStore != null || keyStore != null) {
            clientFactoryBuilder.tlsCustomizer(sslContextBuilder ->
                                                       SslContextConfigurator.configureSslContext(
                                                               sslContextBuilder,
                                                               keyStore,
                                                               delegate.getKeyStorePassword(),
                                                               trustStore,
                                                               delegate.isTrustSelfSignedCertificates())
            );
        }

        // readTimeout -> WebClientBuilder.responseTimeout
        // The value is the timeout to read a response. Value {@code 0} represents infinity.
        // Negative values are not allowed.
        final long readTimeout = delegate.getReadTimeout(TimeUnit.MILLISECONDS);
        if (readTimeout >= 0L) {
            webClientBuilder.responseTimeoutMillis(readTimeout);
        }

        webClientBuilder.factory(clientFactoryBuilder.build());
        return webClientBuilder.build();
    }
Configure and build new {@link WebClient} instance.
resteasy/src/main/java/com/linecorp/armeria/client/resteasy/ArmeriaResteasyClientBuilder.java