Callbacks
before(request)
A pre-request callback function that can be use to validate data before it is sent.
success(response, request)
A callback function invoked if the request succeeds. The function gets passed one argument: the data returned from the server.
error(request)
A callback function invoked if the request fails.