File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 4949import org .apache .hc .core5 .http2 .frame .RawFrame ;
5050import org .apache .hc .core5 .http2 .impl .H2Processors ;
5151import org .apache .hc .core5 .http2 .impl .nio .H2StreamListener ;
52+ import org .apache .hc .core5 .http2 .impl .nio .bootstrap .H2RequesterBootstrap ;
5253import org .apache .hc .core5 .http2 .priority .PriorityFormatter ;
5354import org .apache .hc .core5 .http2 .priority .PriorityValue ;
5455import org .apache .hc .core5 .io .CloseMode ;
5556import org .apache .hc .core5 .util .Timeout ;
5657
5758/**
58- * Example: HTTP/2 request that sets RFC 9218 Priority via context and emits the "Priority" header.
59- * <p>
60- * Requires H2Processors to include H2RequestPriority (client chain) and an HTTP/2 connection.
59+ * HTTP/2 request that emits RFC 9218 Priority via "Priority" header.
6160 */
6261@ Experimental
6362public class H2RequestExecutionWithPriorityExample {
@@ -69,8 +68,7 @@ public static void main(final String[] args) throws Exception {
6968 .setPushEnabled (false )
7069 .build ();
7170
72- // Ensure the client processor chain has H2RequestPriority inside (see H2Processors.customClient)
73- final HttpAsyncRequester requester = org .apache .hc .core5 .http2 .impl .nio .bootstrap .H2RequesterBootstrap .bootstrap ()
71+ final HttpAsyncRequester requester = H2RequesterBootstrap .bootstrap ()
7472 .setH2Config (h2Config )
7573 .setVersionPolicy (HttpVersionPolicy .FORCE_HTTP_2 )
7674 .setHttpProcessor (H2Processors .client ()) // includes H2RequestPriority
You can’t perform that action at this time.
0 commit comments