question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Http Client should support Http/2

See original GitHub issue

Description Quarkus httpClient (quarkus-rest-client) should be able to works over http/2 as the server-side does. Otherwise, if we use quarkus-rest-client for example to exchange data between microservices, then the server(even if is able to talk on Http/2) will talk on the same protocol as the client libraries (Http1.1).

Implementation ideas

Well, I will try to support several clients over the same interface (StrategyPattern). So quarkus-rest-client must be just the common interface of several HttpClient as …VertxHttpClient (that supports Http/2), OkHttp3, ApacheHttpClient…etc And then depends on your configuration, you should have some specific application.properties.

Example: Lets add the proposal common HttpClient interface quarkus-rest-client and an implementation interface smallrye-mutiny-vertx-web-client

Dependencies:

 <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-rest-client</artifactId>
 </dependency>

 <dependency>
         <groupId>io.smallrye.reactive</groupId>
         <artifactId>smallrye-mutiny-vertx-web-client</artifactId>
 </dependency>

application.properties

quarkus.client.http.http2=true
quarkus.client.http.ssl=true
quarkus.client.http.alpn=true
quarkus.client.http.truststore=META-INF/resources/client.keystore
quarkus.client.http.hostverified=false

Thank U!.

External references:

Jira Issue

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
ronsigalcommented, Dec 23, 2020

It looks like we would have to upgrade to HttpClient 5.0. I don’t know yet what the implications would be, but I think it’s a great idea.

2reactions
michalszynkiewiczcommented, Jul 15, 2022

I think it would be good to do so

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use HTTP 2 with HttpClient in .Net - Stack Overflow
The HttpClientHandler used up to .NET Core 2.0 supported HTTP/2. The following code will return 2.0 in a project that targets Core 2.0...
Read more >
How to use HTTP/2 with HttpClient in .NET 6.0 - Siaka Baro
In this section, we will create a basic console application that uses the HttpClient to send an HTTP GET request to a server...
Read more >
HTTP/2 Support - HTTPX
Enabling HTTP/2 support on the client does not necessarily mean that your requests and responses will be transported over HTTP/2, since both the...
Read more >
Support #HTTP2 in your C# Client code
if you want to use HTTP/2 then you need to write some extra code. First, let's prove that you're using HTTP 1.1. WebClient...
Read more >
HTTP/2 Frequently Asked Questions
1 ALPN identifier, then you will not need to support any HTTP/1.1 features. For HTTP/2 over TCP ( h2c ), you need to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found