Possible Typo
Daniel Fuchs
daniel.fuchs at oracle.com
Tue Aug 22 17:40:14 UTC 2023
Hi Albert,
Thank you for spotting this.
I have updated the example, it should now show:
Redirect.NORMAL (you may have to refresh your browser
cache to see it).
best regards,
-- daniel
On 22/08/2023 13:03, Albert Attard wrote:
> Hello Folks.
>
> Is there a typo in the example shown in
> https://openjdk.org/groups/net/httpclient/intro.html
> <https://openjdk.org/groups/net/httpclient/intro.html>?
>
> HttpClient client = HttpClient.newBuilder()
> .version(Version.HTTP_2)
> .followRedirects(Redirect.SAME_PROTOCOL)
> .proxy(ProxySelector.of(new InetSocketAddress("www-proxy.com
> <http://www-proxy.com>", 8080)))
> .authenticator(Authenticator.getDefault())
> .build();
>
> I believe that the enum value SAME_PROTOCOL was replaced by NORMAL (Java
> Doc
> <https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.Redirect.html>).
>
> With kind regards,
> Albert Attard
More information about the net-dev
mailing list