Has anybody tried this yet?

Please try this and send me comments:

from gluon.tools import Service

service=Service(globals())
@service.run
@service.json
@service.jsonrpc
@service.xmlrpc
@service.amfrpc
def f(a,b):
    return a+b

@service.rss
def myfeed():
    return dict
(title='title',link='link',description='description',created_on=request.now,
                entries=[dict
(title='title',link='link',description='description',created_on=request.now])

def call():
    return service()

USAGE:
    http://..../app/default/call/run/f?a=3&b=4
    http://...../app/default//call/run/f/3/4
    http://...../app/default//call/json/f/3/4
    etc etc
etc ...
    http://..../app/default//call/rss/myfeed
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to