Handling OPTIONS request in a web2py RESTful API

51 views
Skip to first unread message

Daniel Gonzalez

unread,
May 10, 2013, 7:47:05 AM5/10/13
to web...@googlegroups.com
Hi,

I have implemented a RESTful api in web2py which handle the usual GET, POST, PUT, DELETE. (using @request.restful())
Is there a standard mechanism in web2py to implement OPTIONS requests?

Thanks,
Daniel

mcamel

unread,
Nov 27, 2019, 8:27:54 AM11/27/19
to web2py-users
I think you have to add code to handle OPTIONS the same way is described in the manual for GET, POST, PUT, DELETE.

In my case it worked just adding this:

    def OPTIONS(*args, **vars):
       
return dict()

    
Reply all
Reply to author
Forward
0 new messages