const axios = require('axios');
const message =
`
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bil="http://tvcaboao.beontech.com:90/beonservices/tvcabo/billinggate"/>
<soapenv:Header/>
<soapenv:Body>
<bil:ClientePrevFact>
<bil:NContrato>01709864784</bil:NContrato>
</bil:ClientePrevFact>
</soapenv:Body>
</soapenv:Envelope>
`;
const url = "https://api.tvcabo.mz/BeOnServices/TVCabo/BillinggateQT/Billinggate.asmx?WSDL";
//const url = "https://agenda.tvcabo.co.mz:90/BeOnServices/TVCabo/BillinggateQT/Billinggate.asmx?WSDL";
const headers = () =>{
return {
headers: {
'Content-Type': 'text/xml;charset=UTF-8'
//'Content-Type':'text/xml',
// 'Authorization':`Basic ${MKESH_API_KEY}`
}
}
}
const callTvcabo = async() => {
try {
const resp = await axios.post(url, message,headers());
console.log(resp.data);
} catch (e) {
console.log(e.response.data);
}
}
callTvcabo();