Pre Processors are JavaScript operations executed before a request is sent. They can be used to modify request URLs, headers, or variables, perform data transformation, or make prerequisite requests. Apidog supports the Postman SDK for accessing request/response objects and variables. Available pre-processor types include Custom Scripts, Public Scripts, Database Operations, and Wait.
// Example: Increment an environment variable named 'Userid' before sending
let Userid = parseInt(pm.environment.get("Userid"));
Userid = Userid + 1;
console.log(Userid);
pm.environment.set("Userid", Userid);