title: Blazor and SSE (Server-Sent Events)
body: <p>is possible to implement use Server-Sent Events in blazor apps? Or there is other method to listening for request/response to API?</p>
  <pre><code>&lt;script&gt;
      source = new EventSource('/Home/Messaggio');
      source.onopen = function (ddd) {
          console.log(&quot;aperta&quot;);
      };
      source.onerror = function (ddd) {
          console.log(&quot;errore&quot;);
          console.log(ddd.data);
          source.close();
      };
  
      source.onmessage = function (ddd) {
          $(&quot;#Messaggio&quot;).text(ddd.data);
          console.log(ddd.data);
      };
  &lt;/script&gt;
  </code></pre>
  <p>Is method to get data in javascript code and add the data to C# blazor variable List responseObject?</p>