diff --git a/frontend/src/pages/api/test-debug.ts b/frontend/src/pages/api/test-debug.ts new file mode 100644 index 0000000..85989e7 --- /dev/null +++ b/frontend/src/pages/api/test-debug.ts @@ -0,0 +1,12 @@ +import type { APIRoute } from 'astro'; + +export const GET: APIRoute = async ({ request }) => { + return new Response(JSON.stringify({ + url: request.url, + method: request.method, + headers: Object.fromEntries(request.headers.entries()), + }), { + status: 200, + headers: { 'Content-Type': 'application/json' } + }); +}; \ No newline at end of file diff --git a/frontend/src/pages/api/test-post.ts b/frontend/src/pages/api/test-post.ts new file mode 100644 index 0000000..0d38eba --- /dev/null +++ b/frontend/src/pages/api/test-post.ts @@ -0,0 +1,14 @@ +import type { APIRoute } from 'astro'; + +export const POST: APIRoute = async ({ request, url }) => { + const params = Object.fromEntries(url.searchParams.entries()); + + return new Response(JSON.stringify({ + method: 'POST', + params, + url: request.url, + }), { + status: 200, + headers: { 'Content-Type': 'application/json' } + }); +}; \ No newline at end of file