-
-
Save auryn31/624197129a12f544dc11ced14ff56856 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let evtSource = new EventSource("http://localhost:8080/cars/sse"); | |
evtSource.onmessage = function(e: any) { | |
if(e.data == "done") { | |
evtSource.close(); | |
} else { | |
commitAsyncCar(store, JSON.parse(e.data)); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment