hacktiivist
hacktiivist

Reputation: 47

How to make a call using http/2

I tried to use java client to make a http/2 call to server but came to know that Java8 doesnt have support for http/2 and other java client like pushy etc needs alpn dependency. I have figured out that netty can be used for http/2 without alpn.

Can anyone suggest how to make http/2 using netty ? Sample code would be appreciated.

Upvotes: 0

Views: 320

Answers (1)

Norman Maurer
Norman Maurer

Reputation: 23567

Just check the examples that are shipped with netty. It includes server and client examples for http2. Netty itself provides support for a native SSL implementation (openssl) that will do the ALPN stuff for you. Also it will "just work" if you use Java9 as it supports ALPN.

Upvotes: 1

Related Questions