Home / Function/ GET() — astro Function Reference

GET() — astro Function Reference

Architecture documentation for the GET() function in update.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  20f44c0c_ef67_81e4_dc88_03441443b88a["GET()"]
  1dd38086_337d_4255_9ecc_a171daa9b29f["update.ts"]
  20f44c0c_ef67_81e4_dc88_03441443b88a -->|defined in| 1dd38086_337d_4255_9ecc_a171daa9b29f
  style 20f44c0c_ef67_81e4_dc88_03441443b88a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/cloudflare/test/fixtures/sessions/src/pages/update.ts lines 3–10

export const GET: APIRoute = async (context) => {
	const previousObject = await context.session.get("key") ?? { value: "none" };
	const previousValue = previousObject.value;
	const sessionData = { value: "expected" };
	context.session.set("key", sessionData);
	sessionData.value = "unexpected";
	return Response.json({previousValue});
};

Domain

Subdomains

Frequently Asked Questions

What does GET() do?
GET() is a function in the astro codebase, defined in packages/integrations/cloudflare/test/fixtures/sessions/src/pages/update.ts.
Where is GET() defined?
GET() is defined in packages/integrations/cloudflare/test/fixtures/sessions/src/pages/update.ts at line 3.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free