1、启动tomcat,确定路径:http://localhost:8080/d/forgeJS.js

postman引入外部js文件

 

 postman引入外部js文件

 

 2、postman  Pre-request Script

console.log(pm.environment.get("variable_key1"));


if(!pm.globals.has("forgeJS")){
pm.sendRequest('http://localhost:8080/d/forgeJS.js', function (err, res) {
if (err) {
console.log(err);}
else {
pm.globals.set("forgeJS", res.text());}
})}
eval(postman.getGlobalVariable("forgeJS"));

相关文章:

  • 2021-12-06
  • 2022-02-09
  • 2021-10-09
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-08
  • 2021-11-21
  • 2022-01-05
  • 2021-03-30
  • 2021-09-29
  • 2021-12-03
  • 2021-11-17
相关资源
相似解决方案