Skip to content

v1.3.2

Latest
Compare
Choose a tag to compare
@hengfeiyang hengfeiyang released this 27 Dec 08:41
· 3 commits to main since this release
  • add http2 pusher

usage:

func handle(c *baa.Context) {
	if pusher, ok := c.Resp.Pusher(); ok {
		err := pusher.Push("/index.css", nil)
		log.Println("push: index.css ", err)
		err = pusher.Push("/index.js", nil)
		log.Println("push: index.js ", err)
	}
	http.ServeFile(c.Resp, c.Req, "index.html")
}