Currently, there is no way to pass additional parameters into restful handler:
class rest():
def put(self, data):
# .. no way to distinguish between URIs
# Use one handler to handle 2 different URIs
web.add_resource(rest, '/api1')
web.add_resource(rest, '/api2')
Proposed way is to add ability to pass any additional keyword args **kwargs:
class rest():
def put(self, data, type):
if type == 1:
# do something for first case
else:
# second case
# Use one handler to handle 2 different URIs
web.add_resource(rest, '/api1', type=1)
web.add_resource(rest, '/api2', type=2)
Currently, there is no way to pass additional parameters into restful handler:
Proposed way is to add ability to pass any additional keyword args
**kwargs
: