Skip to content

Instantly share code, notes, and snippets.

@trobrock
Created July 11, 2011 22:48
Show Gist options
  • Save trobrock/1076992 to your computer and use it in GitHub Desktop.
Save trobrock/1076992 to your computer and use it in GitHub Desktop.
Async thrift with dojo
var url = "/txn_store_api";
var t = new Thrift.Transport();
var p = new Thrift.Protocol(t);
var client = new TxnStore.TxnStoreClient(p);
var d = dojo.xhrPost({
url: url,
handleAs: "json",
postData: client.send_getTxns("110237153", []),
load: function(res){
t.setRecvBuffer(res);
console.log(client.recv_getTxns());
},
error: function(e){
console.log(e);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment