Are there any open-source references for the web2py remote procedure calls (i.e. @service.run) to get information from and post it to a table in the database?
Asked
Active
Viewed 96 times
3
-
I'm not sure, but if you post to the [mailing list](https://groups.google.com/forum/?fromgroups&pli=1#!forum/web2py) with some more details, someone will probably be able to offer help. – Anthony Jul 18 '11 at 22:24
-
I don't think this actually has anything to do with App Engine, does it? – Nick Johnson Jul 19 '11 at 00:34
-
I was going to deploy to GAE, but yeah, maybe the tag was wrong. Sorry. – John Jul 19 '11 at 05:31
1 Answers
2
@service.run is not very useful it is more for testing before you move on to xmlrpc or soap or jsonrpc than anything else. You should use a restful interface for what you asked. For example:
db.define_table('mytable,Field('name'))
@request.restful()
def callme():
def GET(id):
return db.mytable(id)
def POST(name):
return db.mytable.insert(name=name)
return locals()

Massimo
- 1,653
- 12
- 11