Skip to content

Instantly share code, notes, and snippets.

@yvesvanbroekhoven
Created August 5, 2011 10:21
Show Gist options
  • Save yvesvanbroekhoven/1127269 to your computer and use it in GitHub Desktop.
Save yvesvanbroekhoven/1127269 to your computer and use it in GitHub Desktop.
Failtale test
var report = {
project: {
api_token: "d43be74d5664b4c295b56bdb2c0ca798cf2206b5"
},
error: {
hash_string: "1"
},
occurence: {
name: "MethodNotFound tralalala",
reporter: "Javascript",
description: "optional description",
backtrace: "backtreeeees",
properties: {}
}
};
$.ajax({
type: "post"
, url: "http://failtale.be/reports.json"
, contentType: "application/json"
, data: "report=" + JSON.stringify(report)
, dataType: "json"
, success: function(data){
console.log(data);
}
, error: function(jqXHR, textStatus, errorThrown){
console.log(jqXHR);
console.log(textStatus);
console.log(errorThrown);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment