request({
url:"https://gzmss.iok.la/api/v2/users/signin",
method: 'POST',
headers: {
"content-type": "application/json",
},
// body: JSON.stringify(userObj),
body:{'password':"123456",
'user_name':"yeungy"
},
json: true
},function(error,response,body){
console.log(body);
})
为什么这段代码会报 400 错误,用 postman 能通,通过 node 请求不行
url:"https://gzmss.iok.la/api/v2/users/signin",
method: 'POST',
headers: {
"content-type": "application/json",
},
// body: JSON.stringify(userObj),
body:{'password':"123456",
'user_name':"yeungy"
},
json: true
},function(error,response,body){
console.log(body);
})
为什么这段代码会报 400 错误,用 postman 能通,通过 node 请求不行