Skip to content

Instantly share code, notes, and snippets.

@narenaryan
Created December 11, 2015 08:35
Show Gist options
  • Select an option

  • Save narenaryan/5a922746e0755114c88b to your computer and use it in GitHub Desktop.

Select an option

Save narenaryan/5a922746e0755114c88b to your computer and use it in GitHub Desktop.
SSE sample code
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