Remix.run Logo
lenkite 3 hours ago

Your http client setup is over-complicated. You certainly don't need `.proxy` if you are not using a proxy or if you are using the system default proxy, nor do you need `.authenticator` if you are not doing HTTP authentication. Nor do you need `version` since there is already a fallback to HTTP/1.1.

  HttpClient client = HttpClient.newBuilder()
    .followRedirects(Redirect.NORMAL)
    .connectTimeout(Duration.ofSeconds(20))
    .build();
ffsm8 3 hours ago | parent [-]

It was literally just copy pasted from the linked source (the official Oracle docs)

Tostino 2 hours ago | parent [-]

And those docs were likely trying to show you how to use multiple features, not the most basic implementation of it