javascript - Make JSON-RPC jQuery plugin work with GAE ProtoRPC -
i trying make these 2 libraries work together. not sure can connect out of box. before using json-rpc plugin did standard $.ajax
functionality. please give me short example of how client-side function should , entry point on gae side.
or maybe there should special protorpc jquery library created make work easily?
protorpc doesn't use json-rpc message format. uses simpler format each api method provides own endpoint, rather 1 endpoint takes method name part of request dictionary.
here's example provide $.ajax
:
$.ajax({url: '/hello.hello', type: 'post', contenttype: 'application/json', data: '{ my_name: bob }', datatype: 'json', success: function(response) { // response { hello: "hello there, bob!" } alert(response.hello); } });
do need special jquery library this? i'm not sure can simpler.
Comments
Post a Comment