flask-accept
flask-accept copied to clipboard
Multiple resources using Flask Restful
Is there an ability use the support
decorator on a method from a different Flask Restful resource?
i.e.
class Health(Resource):
@accept_fallback
def get(self):
return {'success': True}
class Health2(Resource):
@Health.get.support('application/v2')
def get2(self):
return {'success': False}
I don't see any reason why this wouldn't work, but I'm not too familiar with Flask-Restful. Have you tried it?
Perhaps @TheMourningDawn would be able to chime in here, they added the support for Flask-Restful to this package.