You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jmarnold edited this page Jul 7, 2012
·
3 revisions
Overview
Several events are useful to listen for during the processing of requests. The events are referred to as "topics" (ala amplifyjs):
AjaxStarted
Occurs whenever a new request is started. It has a correlationId property containing the ID of the request.
AjaxCompleted
Occurs whenever a request has completed. It has a correlationId property containing the ID of the request which can be used to correlate with the AjaxStarted event.
In order for the correlation process to work, your web framework must be made aware of the X-Correlation-Id header. This header is sent in the request and is expected to be in the response (in order to properly correlate).
ContinuationError
Occurs whenever a continuation is processed and the error property has a length greater than 0.
HttpError
Occurs whenever a continuation is processed and the status code is not 200.
How to consume the events
You can listen for any of the events using the bind method on the root continuations object: