diff --git a/index.ts b/index.ts index de241b0..8e84334 100644 --- a/index.ts +++ b/index.ts @@ -8,7 +8,7 @@ const handler = async (request: Request): Promise => { if (request.method === "GET") { // GET リクエストの場合は、クエリパラメータを返す - const data = JSON.stringify({ pathname, search }, null, 2); + const data = JSON.stringify({ pathname, search, test: true }, null, 2); console.log("Request Data:", data); return new Response(data, { headers: { "Content-Type": "application/json" }, @@ -16,13 +16,13 @@ const handler = async (request: Request): Promise => { } else if (request.method === "POST") { // POST リクエストの場合は、リクエストボディを返す const payload = await request.text(); - const data = JSON.stringify({ pathname, payload }, null, 2); + const data = JSON.stringify({ pathname, payload, test: true }, null, 2); console.log("Request Data:", data); return new Response(data, { headers: { "Content-Type": "application/json" }, }); } - return new Response("Not Found", { status: 404 }); + return new Response("[TEST] Not Found", { status: 404 }); }; console.log(`Listening on http://localhost:${PORT}/`);