Send a message immediately
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2019-02-20 10:50:43 +01:00
parent 0d24e58c88
commit 3fe9d65cdf
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -123,7 +123,8 @@ func (h *microsubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Connection", "keep-alive") w.Header().Set("Connection", "keep-alive")
w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Origin", "*")
w.WriteHeader(200) fmt.Fprintf(w, "event: welcome\r\n")
fmt.Fprintf(w, "data: {\"key\":\"hello world\"}\r\n\r\n")
flusher.Flush() flusher.Flush()