Is it possible to mock HTTP error codes, and other header information using mockjax?
$.mockjax({
url: '/some/webservice',
dataType: 'html',
responseText: '<div>Hello there</div>'
});
// Normal ajax request in your application
$.ajax({
url: '/some/webservice',
dataType: 'html',
success: function(html) {
alert('You said: ' + html);
}
});
Alternatively, is there another library that can?