Rest APIs
Pre-Request Script

Pre-Request Script


The pre-request script is a javascript script that will get executed just before the request run. You can write javascript to perform certain operations which are needed to be completed before request execution start.


  1. How to use variables in pre-request script? Learn more
//sample pre-request script to set the global variable just before request run
const count = fc.globals.get("increment");
fc.globals.set("increment", increment++);
  1. How to use request object in pre-request script? (wip)