Skip to content

Instantly share code, notes, and snippets.

@daveknapik
Created April 10, 2014 22:52
Show Gist options
  • Save daveknapik/10430146 to your computer and use it in GitHub Desktop.
Save daveknapik/10430146 to your computer and use it in GitHub Desktop.
$.mockjax({
url: '/foo',
responseTime: 100,
responseText: {
status: 'success',
message: 'well done, you!'
}
});
$.ajax({
url: "/foo",
type: "POST",
data: data,
success: function(response, status, xhr){
//do successy stuff
},
error: (xhr, status, error){
//do errory stuff
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment