let baseUrl = "http://";
const postRequest = {
url: baseUrl + '/login/appLogin',
method: 'POST',
header: {
'Content-Type': 'application/json',
},
body: {
mode: 'raw',
raw: JSON.stringify(
{ password: '12345678', username: '18312345678' }
)
}
};
pm.sendRequest(postRequest, (error, response) => {
console.log(response.json())
pm.request.addHeader({ key: "token", value: response.json().data.token });
})
网友评论