On my local server (jsboss), I have a resource located at:
Using the Mozilla RESTClient addon, when I access this URL, I receive the following response:
Status Code: 200 OK
Content-Length: 160
Content-Type: application/vnd.collection+json
Alternatively, if I open the same URL in a regular browser window, the response is saved as a file.
To further test this resource, I created a basic HTML file that makes an AJAX call to it:
var x = new XMLHttpRequest();
x.onreadystatechange = function() {
if(x.readyState == 4 && x.status == 200) {
alert(x.responseText);
}
}
x.open("GET", "http://x.x.x.x:8080/webapis/", true);
x.setRequestHeader("Content-Type", "application/vnd.collection+json");
x.send();
However, upon executing this file, I encounter a status of 0 and empty response content. Can anyone assist me in identifying what might be causing this issue? Thank you in advance.