const send_req = {
url: "httpxxx/login",
method: "post",
header: "content-type:application/x-www-form-urlencoded; charset=UTF-8",
body: {
mode: 'raw',
raw:"username=xx&pwd=xx"
}
};
pm.sendRequest(send_req, function (err, response) {
var jsonData = response.json();
pm.globals.set("token", jsonData.data.access_token);
console.log(pm.globals.get("token"));
});