I have this simple API call that is working in POSTMAN:
Real simple. Works perfectly.
However, I've tried to replicate this in jQuery like follows:
$.ajax({
url: "https://example.us-east-1.amazonaws.com/prod",
type: "POST",
contentType: "application/json",
data: {
id_api: "catalogo_get_categorias"
},
success: function(results){
console.log(results)
},
error: function(err) {
console.log(err)
}
});
But it keeps coming back with 500 error.
Any ideas?
Edit:
The console produces the following error when I have the Chrome CORS extension disabled
And with the CORS plugin enabled this is the output