Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ArtOfData
Partner - Contributor
Partner - Contributor

@qlik/api replacement for Enigma session 'on' methods

Hi all,

I'm migrating sdome mashups from using EnigmaJS to the new Qlik API and there's one piece of functionality that I'm unable to find a replacement for.

With Enigma, I was able to set up a listener on the session to monitor outgoing requests to the engine and responses when they were processed with:

session.on('traffic:sent', (data) => {
console.log(data)
});

This method does not exist on the AppSession type from the @qlik/api/qix package, and I can't find documentation for a replacement anywhere.

Is this something that exists? Can anyone offer a pointer to where it might be found or an alternative method to monitor outgoing requests and when they're completed?

 

 

Labels (2)
1 Solution

Accepted Solutions
alex_colombo
Employee
Employee

Hey @ArtOfData you can intercept websockets events using onWebSocketEvent method.
const appSession = qix.openAppSession(appId);

appSession.onWebSocketEvent( (event) => { console.log(event); })

View solution in original post

1 Reply
alex_colombo
Employee
Employee

Hey @ArtOfData you can intercept websockets events using onWebSocketEvent method.
const appSession = qix.openAppSession(appId);

appSession.onWebSocketEvent( (event) => { console.log(event); })