Golang http2服务器推送的高级客户端 [英] High level client for golang http2 server push

查看:132
本文介绍了Golang http2服务器推送的高级客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

golang 1.6是在Http2支持下发布的.我在线搜索了谷歌,但找不到如何使用Go进行Http2服务器推送的任何示例.是否为此实现了任何高级客户端?人们有没有做过的例子?

golang 1.6 was released with Http2 support. I googled online but couldn't find any examples of how to do Http2 server push using Go. Is there any high level client implemented for that? Is there any examples that people have already done?

推荐答案

std库中的http2实现未公开特定于http2的接口,但是您可以使用

The http2 implementation in the std library doesn't expose http2-specific interfaces, however you can use golang.org/x/net/http2 directly.

https://godoc.org/golang.org/x/net/http2#Framer.WritePushPromise

这篇关于Golang http2服务器推送的高级客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆