Dynamic Input

Prev Next

You can change any information on the request in adapter.js when setting the request object.

  • Information can be placed into adapter.js if it applies to a specific action.

  • Dynamic information can come from IAP if it is in the method signature of the adapter method.

Example: A dynamic input within the request object.

someCall(id, body, auditValue, callback) {

/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
..
let callHeaders = { hdr1: auditValue };
..

// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties,
// filter, priority and event
const reqObj = {
  payload: body,
  uriPathVars: [ id ],
  uriOptions: { page: 1 },
  authData: callHeaders
};