I'm new to AWS. Trying to consume an API in AWS. It's an AJAX request, the response is something like {“readyState”:0,“responseText”:“”,“status”:0,“statusText”:“error”}
I'm trying to consume the API from my localhost. As few posts says AWS doesn't allow crossDomain request. How do I test it locally?
var postURL= "http://example.com/user/" + txtMemberId;
$.ajax({
url: postURL,
crossDomain: true,
datatype: "text",
success: function (data, textStatus, xhr) {
console.log(data);
},
error: function (xhr, textStatus, errorThrown) {
console.log(xhr);
}
});
The status is a (ok=200) and it's a valid response if I directly hit the API by giving URL in the browser
