You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In most cases, this is working as intended. For example:
$.ajax({
url : "../myJsonService",
dataType: "json",
fixture: "fixtures/fakeJsonService.json",
success : function(msg, textStatus, jqXHR) {
alert("Succeeded in loading data: " + textStatus + " " + errorThrown);
},
error : function(jqXHR, textStatus, errorThrown) {
alert("Failed to load data: " + textStatus + " " + errorThrown);
}
});
The fixture library is included, and everything works as expected.
However, if my ajax request points to an absolute URL rather than a relative path, it still seems to try to contact that url.
That is, if this line:
url : "../myJsonService",
is changed to:
url : "http://localhost:8080/myJsonService",
Then the service still gets called and, if the service is unavailable or throws an error, the "error" callback is called.. (Even if I have a valid fixture to take its place).
I would expect that if I have a fixture in place, and fixtures are enabled, then that fixture data would always be returned and the error function would never get called.
The text was updated successfully, but these errors were encountered:
I am using the stand-alone version of fixtures linked to from here:
http://jupiterjs.com/news/ajax-fixtures-plugin-for-jquery
In most cases, this is working as intended. For example:
$.ajax({
url : "../myJsonService",
dataType: "json",
fixture: "fixtures/fakeJsonService.json",
success : function(msg, textStatus, jqXHR) {
alert("Succeeded in loading data: " + textStatus + " " + errorThrown);
},
error : function(jqXHR, textStatus, errorThrown) {
alert("Failed to load data: " + textStatus + " " + errorThrown);
}
});
The fixture library is included, and everything works as expected.
However, if my ajax request points to an absolute URL rather than a relative path, it still seems to try to contact that url.
That is, if this line:
url : "../myJsonService",
is changed to:
url : "http://localhost:8080/myJsonService",
Then the service still gets called and, if the service is unavailable or throws an error, the "error" callback is called.. (Even if I have a valid fixture to take its place).
I would expect that if I have a fixture in place, and fixtures are enabled, then that fixture data would always be returned and the error function would never get called.
The text was updated successfully, but these errors were encountered: