Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3630

cancel or stop a SSE endpoint connection

$
0
0
func handleUnknownEventPath(w http.ResponseWriter) {  w.WriteHeader(http.StatusMethodNotAllowed)  fmt.Fprintln(w, "Unknown method")  w.(http.Flusher).Flush()}

immediately after calling this method return statement is used. but the connection is not stopping it still dangling open. but the status code is delivered, but the connection is still open. How to close the connection from the server side, like it happen to the normal GET requests.


Viewing all articles
Browse latest Browse all 3630

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>