Skip to main content

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: onRequestBefore runs before the request, onRequestAfter runs after it (still before the response).
  • To check the result, use onReceiveDone, onReceiveError, or the Data Set update events — onResponseUpdateBefore/onResponseUpdateAfter for a normal request, onPushUpdateBefore/onPushUpdateAfter for a real-time subscription. The response value isn't available in this function yet.