@Override
            public InetAddress[] resolve(final String host) throws UnknownHostException {
                if (host.equalsIgnoreCase("myhost")) {
                    return new InetAddress[] { InetAddress.getByAddress(new byte[] {127, 0, 0, 1}) };
                }
                return super.resolve(host);
            }
This example demonstrates how to customize and configure the most common aspects
of HTTP request execution and connection management.
httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientConfiguration.java