(body: unknown, status = 200)
| 98 | } |
| 99 | |
| 100 | function jsonResponse(body: unknown, status = 200): Response { |
| 101 | return new Response(JSON.stringify(body), { |
| 102 | status, |
| 103 | headers: { 'content-type': 'application/json' }, |
| 104 | }) |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Build the Worker fetch handler. `resolveCoordinator` maps `(env, threadId)` to |