Created
July 11, 2011 22:48
-
-
Save trobrock/1076992 to your computer and use it in GitHub Desktop.
Async thrift with dojo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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