ASPNET Core Server Sent Events / Response flush
Client Side – wwwroot/index.html On page load, create an EventSource for the http://www.somehost.ca/sse url. Then write its events to the console. <body> <script type=”text/javascript”> var source = new EventSource(‘sse’); source.onmessage = function (event) { console.log(‘onmessage: ‘ + event.data); }; source.onopen = function(event) { console.log(‘onopen’); }; source.onerror = function(event) { console.log(‘onerror’); } </script> </body> Server Side … Read more