| skipped 37 lines |
38 | 38 | | } |
39 | 39 | | |
40 | 40 | | if !websocket.IsWebSocketUpgrade(r) { |
41 | | - | render.JSON(w, r, snapshot()) |
| 41 | + | w.Header().Set("Content-Type", "application/json") |
| 42 | + | render.Status(r, http.StatusOK) |
| 43 | + | w.Write(snapshot()) |
| 44 | + | w.(http.Flusher).Flush() |
42 | 45 | | return |
43 | 46 | | } |
44 | 47 | | |
| skipped 50 lines |