setOnRequestCallback
Set a callback invoked per-request to dynamically build SWML. When set, the
static SwmlBuilder is ignored and the callback’s returned
SwmlBuilder is used instead.
Parameters
cb
Callback function that receives (queryParams, bodyParams, headers) and
returns a SwmlBuilder or Promise<SwmlBuilder>.
On GET requests, bodyParams is always an empty object ({}). The body is only
parsed on POST requests.
Returns
this — Returns the service for method chaining.