【发布时间】:2022-01-22 08:42:00
【问题描述】:
我正在尝试使用google functions 创建一个小型休息服务器。有人可以告诉我如何处理多个资源路径吗?
目前我正在做以下方式。
def func_handler(request):
print(request.path)
if request.path == "/":
return handle_root_path(request)
if request.path == "/test":
return handle_test_path(request)
由于google函数在python下面使用flask,我有什么办法可以使用@app.route装饰器来处理它?
【问题讨论】:
-
下面的答案是否解决了您的问题?如果是这样,请考虑对其进行投票,以便社区会发现答案很有帮助。
标签: python google-cloud-functions