async-http-client icon indicating copy to clipboard operation
async-http-client copied to clipboard

HTTP/2 support

Open bfg opened this issue 8 years ago • 13 comments

Soon to be released netty 4.1 will include HTTP/2 codec pack.

It would be great if AHC 2.0 would support HTTP/2 natively.

examples: https://github.com/netty/netty/tree/4.1/example/src/main/java/io/netty/example/http2

bfg avatar Feb 17 '16 18:02 bfg

Soon to be released netty 4.1 will include HTTP/2 codec pack.

Sure, flagged as experimental.

It would be great if AHC 2.0 would support HTTP/2 natively.

No, because, AHC 2.0 will target Netty 4.0, not 4.1. Some big AHC users, such as Play!, need the intermediate step.

H2 support will only happen in AHC 2.1.

Then, the big question: do you plan on contributing and helping making it happen?

slandelle avatar Feb 17 '16 18:02 slandelle

Okay, i understand; i didn't want to be insulting.

Now, the question; would it be possible to plug in http2 support by adding additional channel initialization or by adding ability to fully customize it?

bfg avatar Feb 17 '16 20:02 bfg

would it be possible to plug in http2 support by adding additional channel initialization or by adding ability to fully customize it?

I really don't think so. Handling multiplexing and server push will require a very different implementation regarding channel handling and API.

slandelle avatar Feb 17 '16 20:02 slandelle

I suspect AHC 2.1 will only support multiplexing, like OkHttp, ie no API change and no push.

slandelle avatar May 30 '16 14:05 slandelle

so do we have a plan for supporting http/2?

scyiwei avatar Jan 29 '18 08:01 scyiwei

@scyiwei By "we", do you mean you plan on contributing?

slandelle avatar Jan 29 '18 08:01 slandelle

I need http/2 to run performance test based on gatling. I am going to work on this if there is no plan.

scyiwei avatar Jan 29 '18 09:01 scyiwei

We've started working on HTTP/2 internally. Work with first be pushed in FrontLine, our Gatling Entreprise product, then Gatling. We'll port into AHC once we are confident with providing a public API and merging with existing AHC HTTP/1 code or rewrite it.

slandelle avatar Jan 29 '18 10:01 slandelle

@slandelle any news regarding HTTP/2 support? Anything community can help with?

lpandzic avatar Mar 20 '19 10:03 lpandzic

@lpandzic Not on my side.

I won't be working actively on this project anymore, just coordinating contributions.

I've moved Gatling to its own HTTP client so I can change things there without breaking public API and it does have a first take at HTTP/2 support. You can maybe have a look and trying contributing here. One of the hard things is that there are so many features in HTTP/2 that it's complicated to come up with a high level user-friendly API.

slandelle avatar Mar 20 '19 11:03 slandelle

So AHC is basically a dead project now since there's no longer an active maintainer? Any plans to add this information as a disclaimer to README.md?

lpandzic avatar Mar 20 '19 11:03 lpandzic

i also hope that support for http/2 multiplexing will be added 👍

RestfulBlue avatar Jul 17 '19 13:07 RestfulBlue

For sure, I'll never have the bandwidth on my own personal time to work on this. Feel free to contribute.

slandelle avatar Jul 17 '19 14:07 slandelle