i setup the ProtoRPC hello app and it doesn’t work i’m using this to post to it
$.ajax({url: "http://wordninjabackend.appspot.com/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);
}
});
and i’m geting: 405 Method Not Allowed
app.yaml
application: wordninjabackend
version: 1
api_version: 1
runtime: python
handlers:
- url: .*
script: main.py
Alright it is python on app engine, its just the sample program so it has to be something wrong with my post to the server
With protorpc, it expects the remote method name in your HelloService to be on the url you post to.
If you’re using this code to register the service mapping,
then you need to change your post url to this:
http://wordninjabackend.appspot.com/hello.hello
The extra “.hello” refers to the method “hello” in the HelloService class. If you rename that method to fred, you’ll also need to change that to .fred
For more on how this works, just read further down the page, where they develop PostService for the guestbook application.
https://developers.google.com/appengine/docs/python/tools/protorpc/overview#The_Hello_World_of_ProtoRPC