我正在寻找添加一个falcon.before
钩子,例如:
def check_authenticated(request, response, resource, params):
print(request.headers)
request.context.test = 'test'
@falcon.before(check_authenticated)
class testing(object):
async def on_get(self, request, response):
print(request.headers)
print('made it here')
但我一直面临错误:TypeError: object NoneType can't be used in 'await' expression