Making a Request

In order to make requests, we will always use the AjaxUpdater as our access point. This object provides a layer of separation in our code to keep our XHRs easier to manage and consistent across the application. In this section, we will use this object to make our first engine request and get an idea of why this layer of abstraction is necessary. When we make a request through the AjaxUpdater, we will use a method called Update. The Update method takes three parameters: a method, a service, and an optional callback method. If a callback method is not specified, a default callback will be set in the AjaxUpdater object, which will reset a Boolean called isUpdating to false. This Boolean is set to true each time a request is made ...

Get Ajax for Web Application Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.