I'd like

new HttpComponentsClientHttpRequestFactory(HttpClients.custom().disableRedirectHandling().build());

instead of

    var rf = new HttpComponentsClientHttpRequestFactory();
    rf.setHttpClient(HttpClients.custom().disableRedirectHandling().build());

this would be consistent with JdkClientHttpRequestFactory

        new JdkClientHttpRequestFactory(HttpClient.newBuilder().followRedirects(HttpClient.Redirect.NEVER).build())

honestly, I wish both would just take the builder, although especially in this case to avoid exposure of the auto-closable which IDE's and other quality tools will warn about. That would be inconsistent though.

new HttpComponentsClientHttpRequestFactory(HttpClients.custom().disableRedirectHandling());

The goal is to avoid creating a variable, because, why?

Affects: 6.1.6

Comment From: snicoll

Uh?

Comment From: xenoterracide

I'm going to go beat myself in the head with a hammer now, sorry for the PEBKAC