【问题标题】:how to set token automatically in postman如何在邮递员中自动设置令牌
【发布时间】:2023-01-30 21:18:13
【问题描述】:

想在邮递员中自动设置令牌。在登录 Api 调用时自动在邮递员中设置令牌。 想清除邮递员变量并设置新的令牌作为 Api 响应

【问题讨论】:

    标签: api postman


    【解决方案1】:
    1. 在postman中设置collection ver中的token变量。
    2. 在 api 测试部分编写给定的代码
      pm.collectionVariables.unset("<token _name>");
      pm.collectionVariables.set("<token_name>", pm.response.text());
      
      1. 运行 api

    【讨论】:

      猜你喜欢
      • 2018-11-26
      • 2021-07-08
      • 2020-01-15
      • 1970-01-01
      • 2019-04-09
      • 1970-01-01
      • 2021-11-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多