Home / Function/ GET() — astro Function Reference

GET() — astro Function Reference

Architecture documentation for the GET() function in [param].json.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  dd2b82a8_7261_a8f4_74c2_ea4d78f7ae39["GET()"]
  5a1ed0bf_656b_4fc5_5a1b_a5ee4879003f["[param].json.js"]
  dd2b82a8_7261_a8f4_74c2_ea4d78f7ae39 -->|defined in| 5a1ed0bf_656b_4fc5_5a1b_a5ee4879003f
  style dd2b82a8_7261_a8f4_74c2_ea4d78f7ae39 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/test/fixtures/api-routes/src/pages/context/data/[param].json.js lines 17–24

export function GET({ params, request }) {
	return new Response(
		JSON.stringify({
			param: params.param,
			pathname: new URL(request.url).pathname
		})
	);
}

Subdomains

Frequently Asked Questions

What does GET() do?
GET() is a function in the astro codebase, defined in packages/astro/test/fixtures/api-routes/src/pages/context/data/[param].json.js.
Where is GET() defined?
GET() is defined in packages/astro/test/fixtures/api-routes/src/pages/context/data/[param].json.js at line 17.

Analyze Your Own Codebase

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

Try Supermodel Free