首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
V2EX
›
Cloudflare
cf worker Python 的问题,到底是否要 async?
julyclyde
·
28 天前
· 474 次点击
他们文档的例子是不带 async 的
from js import Response
def on_fetch(request):
return Response.new("Hello World!")
但如果我要访问 request 对象,因为 request 对象是 awaitable 的,那我的 on_fetch 函数也
需要加 async
我的提问是:他们怎么做到同时兼容带有和不带 async 的两种不同的 on_fetch 的?
目前尚无回复
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
1181 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 21ms ·
UTC 23:18
·
PVG 07:18
·
LAX 16:18
·
JFK 19:18
Developed with
CodeLauncher
♥ Do have faith in what you're doing.