Distinguishing Request Types
Now, what if you want to distinguish between a normal request and a proxy request? Well, the request context object, most commonly known as the event object has a method called:
  • isProxyRequest : This boolean method determines what type of request is being executed.
1
function listUsers(event,rc,prc){
2
prc.data = userService.list();
3
4
if( event.isProxyRequest() ){
5
return prc.data;
6
}
7
8
event.setView("users/listUsers");
9
}
Copied!
Last modified 3yr ago
Copy link
Edit on GitHub