ok2c commented on code in PR #731:
URL:
https://github.com/apache/httpcomponents-client/pull/731#discussion_r3032759232
##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java:
##########
@@ -936,6 +941,26 @@ public final HttpAsyncClientBuilder
disableRequestPriority() {
return this;
}
+ /**
+ * Configures the {@code ALPN} header to be sent on {@code CONNECT}
+ * requests when establishing an HTTP tunnel through a proxy.
+ *
+ * <p>The supplied protocol IDs are advertised in the given order
(preference order).
+ * If {@code ids} is {@code null} or empty, no {@code ALPN} header will be
added.</p>
+ *
+ * <p>This is a convenience method equivalent to installing a {@link
ConnectAlpnProvider}
+ * that always returns the same list.</p>
+ *
+ * @param ids ALPN protocol IDs to advertise (for example {@code "h2"} and
{@code "http/1.1"})
+ * @return this builder
+ * @since 5.6
+ */
+ public HttpAsyncClientBuilder setConnectAlpn(final String... ids) {
Review Comment:
@arturobernalg What should happen if the caller passes `h3`, `http/0.75`,
`srtuff` to this method?
Why do we even need this method at all? There is already `HttpVersionPolicy`
settable on a per route basis and this is exactly what you should be using
should you decide to proceed further with this feature.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]