onRequestAfter
onRequestAfter
Called right after the request finishes sending, before any response arrives.
Parameters
provInstName(string): The name of the Provider Instance that sent the request
Returns: No return value — this is a callback, so its return value isn't used.
Description
This is the moment just after the request actually goes out over the network. The server response hasn't arrived yet. Use reqID to track ordering when several requests overlap.
Example
function onRequestAfter(provInstName) {
$log.i("requested: " + provInstName );
// Store it so you can match the same request later in onReceiveDone
}
Related
- The difference:
onRequestBeforeruns before the request,onRequestAfterruns after it (still before the response). - To check the result, use
onReceiveDone,onReceiveError, or the Data Set update events —onResponseUpdateBefore/onResponseUpdateAfterfor a normal request,onPushUpdateBefore/onPushUpdateAfterfor a real-time subscription. The response value isn't available in this function yet.