Va 接口模拟登录问题

接口代码:

pm.sendRequest({
url: "http://localhost/eamic/api/v1/login",
method: 'POST',
header: {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: {
mode: 'urlencoded',
urlencoded: [
{key: 'user_email', value: '2'},
{key: 'user_password', value: 'q'}
]
}
},
(err, res) => {
// Set BEARERTOKEN
pm.globals.set("BEARERTOKEN", res.json().data.jwt)
// console.log(res.json());
});

 

 

posted @ 2025-05-26 13:25  王越666  阅读(9)  评论(0)    收藏  举报