Update: The reason for the incorrect information returned in my case was due to attempting to use JSONP to connect to a CORS data setup, which the server did not have configured for my specific computer's access. I needed to engage with someone and adjust the permissions of the configuration file on the server. This turned out to be the underlying issue, as I initially thought CORS and JSONP were interchangeable, but they have distinct ways of implementation and require certain server settings.
Summary: I am facing an $.ajax request failure when querying a server for data. The response indicates success, yet there is a disconnect somewhere.
Upon inspecting the Network tab, I can SEE the expected response. Unfortunately, it remains elusive.
Errors: While it reports a failure, the actual return is as follows:
{"readyState":4,"status":200,"statusText":"success"}
This suggests that the client side flagged something. The response includes:
["Asset","AssetElementDefMap","AssetFile","...multiple elements here...
WorkingSet"]
The Headers are listed below:
**Request**
URL:http://xx.xxx.xx.x/mas3/DataSources/inspecttech.inspecttech/Schema/Classes/?callback=jQuery172021616409649141133_1374243099954&_=1374243124683
Request Method:GET
Status Code:200 OK
**Request Headers**
...
**Response Headers**
...
UPDATE: AJAX REQUEST CODE:
var u = "myusername";
var p = "mypass";
var up = u + ":" + p;
$.ajax({
type: "GET",
url: "http://xx.xxx.xx.x/mas3/DataSources/inspecttech.inspecttech/Schema/Classes/",
contentType: "application/json; charset=utf-8",
dataType: "jsonp",
headers: {Authorization: "Basic "+up},
success: function (r) {
alert("Success: " + JSON.stringify(r));
},
error: function (r) {
alert("Failure: " + JSON.stringify(r));
}
});