Skip to content

Instantly share code, notes, and snippets.

@Marak
Created March 13, 2010 07:44
Show Gist options
  • Save Marak/331192 to your computer and use it in GitHub Desktop.
Save Marak/331192 to your computer and use it in GitHub Desktop.
for( aTest in tests){
//$('#testHTML').html(Tree.build(tests));
var jsonRPCWrapper ={};
jsonRPCWrapper.method = tests[aTest].method;
jsonRPCWrapper.params = [tests[aTest].params.data];
jsonRPCWrapper.id = new Date().getTime();
Sexy
// Instantiates a Sexy object and executes its json() method
.json({"url":"/api","type":"POST","data":JSON.stringify(jsonRPCWrapper)}, function (rsp) {
// create new row in table for each test
$('#testResults').append('<tr class = "'+aTest+'"><td class = "test">'+aTest+'</td><td class = "result">'+rsp.toString()+'</td></tr>');
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment