フェッチハンドラー
WorkerへのHTTPリクエストは、fetch()ハンドラーにRequestオブジェクトとして渡されます。リクエストに対してレスポンスを返すには、Responseオブジェクトを返します:
export default { async fetch(request, env, ctx) { return new Response('Hello World!'); },};-
requestRequest- 受信したHTTPリクエスト。
-
envobject -
ctx.waitUntil(promisePromise): voidwaitUntilを参照してください。
-
ctx.passThroughOnException(): voidpassThroughOnExceptionを参照してください。