1
0
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:
Gerasimos (Makis) Maropoulos
2020-07-24 22:36:46 +03:00
parent a4efb222cc
commit 2f8b29cb3d
6 changed files with 18 additions and 82 deletions

View File

@@ -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 {