Skip to content

Instantly share code, notes, and snippets.

@Marak
Created March 13, 2010 08:03
Show Gist options
  • Save Marak/331198 to your computer and use it in GitHub Desktop.
Save Marak/331198 to your computer and use it in GitHub Desktop.
var sexy = Sexy({
type: "POST"
});
for (aTest in tests) {
var jsonRPCWrapper = {
method: tests[aTest].method,
params: [tests[aTest].params.data],
id: (new Date()).getTime()
};
(function(aTest) {
sexy.json({"url":"/api","type":"POST","data":JSON.stringify(jsonRPCWrapper)}, function (rsp) {
$('#testResults').append('<tr class = "'+name+'"><td class = "test">'+aTest+'</td><td class = "result">'+JSON.stringify(rsp)+'</td></tr>');
});
})(aTest);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment