. . if (req.method === "GET") { const items = await readItems(); return new Response(JSON.stringify(items), { headers: { "content-type": "application/json" }; if (req.method === "POST") {...}; return new Response(JSON.stringify(await addItemServer(item)), { headers: { "content-type": "application/json" } }); } if (req.method === "DELETE") {...}; return new Response(JSON.stringify(await deleteItemServer(id)), { headers: { "content-type": "application/json" } }); } . . コード紹介(2/4)データの窓口となる api/items.ts 10