Created
December 11, 2015 08:35
-
-
Save narenaryan/5a922746e0755114c88b to your computer and use it in GitHub Desktop.
SSE sample code
This file contains hidden or 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
| source = new EventSource(KONNECT_POPUP_ENDPOINT + key + '/suitecrm/' + agentNumber); | |
| //sessionStorage.clear(); | |
| source.onmessage = function(event) { | |
| var data = JSON.parse(event.data); | |
| console.log('I recieved an event.........'); | |
| console.log(data); | |
| getCall(data); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment