mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 10:27:06 +00:00
examples: use ctx.ResponseWriter().Naive().(http.Pusher) instead
Former-commit-id: 7802f4eadf2b1c0a0d2a42ed5ebac3e5c77f88cc
This commit is contained in:
@@ -27,7 +27,7 @@ func pushHandler(ctx iris.Context) {
|
||||
// parent request.
|
||||
target := "/main.js"
|
||||
|
||||
if pusher, ok := ctx.ResponseWriter().(http.Pusher); ok {
|
||||
if pusher, ok := ctx.ResponseWriter().Naive().(http.Pusher); ok {
|
||||
err := pusher.Push(target, nil)
|
||||
if err != nil {
|
||||
if err == iris.ErrPushNotSupported {
|
||||
|
||||
Reference in New Issue
Block a user