On Thu, Mar 17, 2011 at 9:48 PM, Rafe Kaplan <[email protected]> wrote:
>
>  class HelloRequest(messages.Message):
>   my_name = messages.StringField(1, required=True)
>
>  class HelloResponse(messages.Message):
>   hello = messages.StringField(1, required=True)
>
>  class HelloService(remote.Service):
>
>   @remote.method(HelloRequest, HelloResponse)
>   def hello(self, request):
>     return HelloResponse(
>                          hello='Hello there, %s!' %
>                          request.my_name)
>
>
>  $.ajax({url: ‘/hello.hello’,
>          type: 'POST',
>          contentType: 'application/json',
>          data: ‘{ my_name: Bob }’,
>          dataType: 'json',
>          success: function(response) {
>            // The response is { hello: “Hello there, Bob!” }
>            alert(response.hello);
>          }
>         });


Why expose an RPC style interface rather than REST style?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to