Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 499 Bytes

distinguishing-request-types.md

File metadata and controls

18 lines (12 loc) · 499 Bytes

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.
function listUsers(event,rc,prc){
    prc.data = userService.list();

    if( event.isProxyRequest() ){
        return prc.data;
    }

    event.setView("users/listUsers");
}