javascript or jquery to call my custom function in client before every request to server

0
Hi, Is there a way to call a custom function before every client request to server ? I basically need to perform some pre-processing and need to invoke external APIs before every request from client to server. Is there any way to do this? What kind of request does client send to server? Is it Ajax ?
asked
2 answers
0

If you want you can overwrite the javascript function to send request to client ( in Mx7 it should be https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). But it's very dangerous.

answered
0

you could use the mendix client api in your custom js code. so, for example define event handlers for example buttons in your custom js, and then from there execute the microflows behind them.

answered