This website requires JavaScript.
Explore
Help
Sign In
vinchent
/
gin
Watch
1
Star
0
Fork
0
You've already forked gin
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
a768f064d5
gin
/
examples
/
http-pusher
/
assets
/
app.js
2 lines
29 B
JavaScript
Raw
Normal View
History
Unescape
Escape
Add Pusher() function for support http2 server push (#1273) gin already support http2, while previously not support server push. Add Pusher() function to extend the ResponseWriter interface. ```golang // get http.Pusher if pusher := c.Writer.Pusher(); pusher != nil { // use pusher.Push() to do server push } ``` <img width="881" alt="screen shot 2018-03-07 at 11 20 49 pm" src="https://user-images.githubusercontent.com/16014993/37100619-680c00c6-225e-11e8-9352-76ec3bd62894.png">
2018-06-21 01:53:52 +00:00
console
.
log
(
"http2 pusher"
)
;
Reference in New Issue
Copy Permalink