I'm trying to access the post api and I'm getting an access error not allowed, it follows the screenshot of the error:
Andthecodethatdoesajax:
functionfreteeprazo(){varparams={'nCdEmpresa':'','sDsSenha':'','nCdServico':'04014','sCepOrigem':'03638010','sCepDestino':'43810040','nVlPeso':'1','nCdFormato':'1','nVlComprimento':'16','nVlAltura':'5','nVlLargura':'15','nVlDiametro':'0','sCdMaoPropria':'n','nVlValorDeclarado':'0','sCdAvisoRecebimento':'n','StrRetorno':'xml','nCdServico':'40010,41106'};$.ajax({type:"POST",
url: "http://ws.correios.com.br/calculador/CalcPrecoPrazo.asmx/CalcPrecoPrazo",
data: params,
contentType: "text/xml; charset=utf-8",
dataType: "xml",
success: function (data) {
console.log(data);
}
});
}