Test Case Boilerplate
Fork this way...
JavaScript
$.ajax({
type: 'GET',
url: "http://test.dieron.com/sperekrestov/api/greeting/John%20Smith",
crossDomain: true,
cache: false,
contentType: "application/json; charset=utf-8",
success: function(data) {
$('<p>').text(data.greeting).appendTo('body');
},
error: function(jqXHR, textStatus, e) {},
dataType: 'jsonp'
});
$.ajax({
type: 'GET',
url: "http://test.dieron.com/sperekrestov/api/greetingWithError/Vova",
crossDomain: true,
cache: false,
contentType: "application/json; charset=utf-8",
success: function(data) {
$('<p>').text(data.greeting).appendTo('body');
},
error: function(jqXHR, textStatus, e) {
$('<p>').text('Error' + textStatus).css('color', 'red').appendTo('body');
},
dataType: 'jsonp'
});