Advanced Mocking function library

Where can I find the fuction library for advanced mocking? I’m looking for a way to extract request url adding it to the response header as a parameter.

  1. Use $.mockRequest.url.toString() to retrieve the request URL.
  2. Utilize $.mockResponse.headers.upsert to specify the response header.
  3. Choose the Local Mock environment for testing your outcome.

Below is an example demonstrating how to print the test as the response body:

$.mockResponse.setBody({
    keys: Object.keys($.mockRequest),
    url: $.mockRequest.url.toString()
});

For more comprehensive documentation, please refer to Mock expectations - Apidog Docs.