Reactor Netty's HttpClient configuration methods return a configured client reference. Discarding that result leaves the earlier reference with its earlier settings.

This creates a proxy configuration and then loses it:

HttpClient client = HttpClient.create();
client.proxy(spec -> spec.type(ProxyProvider.Proxy.HTTP)
    .host("proxy.example").port(8080));

Retain the returned reference instead:

client = client.proxy(spec -> spec.type(ProxyProvider.Proxy.HTTP)
    .host("proxy.example").port(8080));

WebClient webClient = WebClient.builder()
    .clientConnector(new ReactorClientHttpConnector(client))
    .build();

The types are Reactor Netty's HttpClient and ProxyProvider, plus Spring's WebClient and ReactorClientHttpConnector. Method chaining directly from HttpClient.create() is another way to keep the returned configuration. For permitted public-API requests, the HTTP proxy list supplies candidates for the example host and port.

The same check applies when setting response timeouts or redirect handling. Read the method's return contract instead of assuming a setter mutates the original object.

Also trace which reference reaches the connector. Reassigning a local variable after constructing a connector does not replace the client that connector already received.

Ũhoro ũhĩtĩte