In pre requesite script ,send a request and it is giving 200 status code and res.json() used but it is showing undefined
I tried var r =res.json() console.log(r) but it is giving undefined
In pre requesite script ,send a request and it is giving 200 status code and res.json() used but it is showing undefined
I tried var r =res.json() console.log(r) but it is giving undefined
You can't access a response in a pre-request script (it is executed before the request is sent), you need to use the tests tab:
var j = pm.response.json();
console.log(j);