1.为什么让StatusCode 401响应?
2.in request(varbody变量)发送orderID。
3.inin返回所有细节对应oderID
4.但是它给出了StatusCode 401的响应
bodyVar="<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"><SOAP-ENV:Header/><SOAP-ENV:Body><ipgapi:IPGApiActionRequest xmlns:ipgapi=\"http://ipg-online.com/ipgapi/schemas/ipgapi\" xmlns:v1=\"http://ipg-online.com/ipgapi/schemas/a1\"><v1:Action><v1:InquiryOrder><v1:OrderId>0504_0002</v1:OrderId></v1:InquiryOrder></v1:Action></ipgapi:IPGApiActionRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>";
var options = {
uri: url,
agentOptions: {
cert: certFileContents,
key: keyFileContents,
passphrase: 'abc',
},
rejectUnauthorized : false,
headers:{
'Content-Type': ' text/xml'
},
body: bodyVar
};
request.post(options,function(err,res,body){
console.log(res.StatusCode);//here im getting 401 why?
}).auth(Uid,Pass,true)