postman获取token信息

postman获取token信息

(1)发送登录接口

登录接口
(2)获取请求中token节点数据

postman.setGlobalVariable("token",JSON.parse(responseBody).content.content);
//把返回参数中的keys设置为环境变量

获取token数值
获取token数值成功
(3)其他接口中传入token数值

token {
    
    {
    
    token}}
//传入获取的token数值

其他接口传入token数值

猜你喜欢

转载自blog.csdn.net/qq_38484679/article/details/113373017
今日推荐