Using HTTP2 protocol

HI !

I heard go 1.6 provide http2 protocol basically.

So, I want to use that (I want to build a http server that response with http2 protocol !)…

I just import “net/http”, and create very simple server by the same way used in creating HTTP1.1 server.

But now, my server uses go 1.6, so is it HTTP2.0 server ?? (Simplely??!!)

If we need a particular way for creating http2 server, any good reference plz ?

Thanks !

ps. The program can access to www.google.com ,but can not access to http2.golang.org
How to use HTTP2 by go 1.6 ?

ps2. maybe linux version of go1.6 dose not support HTTP2 by default with any reason…
I use linux version of go1.6 on ubuntu 15.

Maybe http2 is not enabled by default.

really ? I heard go1.6 try to use http2 if it is available… (by default)…
If http2 not possible, go1.6 will use http1.1
(as I know)

In order to use HTTP/2 you need to use TLS.

See https://golang.org/pkg/net/http/

The http package has transparent support for the HTTP/2 protocol when using HTTPS.

2 Likes

Oh I see, I will try it… Thanks : )

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.