I'm trying to run a request that uses the request body for md5 encryption. When I'm using an environment variable in my body using {{var}}
format I get an MD5 validation error whereas hardcoding the variable into the request body works. Is there any way to parameterize the variables into the body? The pre-request script is given below:
const req = pm.request;
var bodymd5 = CryptoJS.enc.Base64.stringify(CryptoJS.MD5(req.body.toString()));
var h = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key).update(req.method).update(req.url.getPath()).update(ctype).update(date).update(bodymd5).update(id).update(nonce).finalize();