Home / Function/ GET() — astro Function Reference

GET() — astro Function Reference

Architecture documentation for the GET() function in [image].svg.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  a6f9e8d9_d17a_4e52_1137_fcd3fffa9682["GET()"]
  f963d09f_a57c_d469_76d3_c33ec49964c1["[image].svg.ts"]
  a6f9e8d9_d17a_4e52_1137_fcd3fffa9682 -->|defined in| f963d09f_a57c_d469_76d3_c33ec49964c1
  style a6f9e8d9_d17a_4e52_1137_fcd3fffa9682 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/test/fixtures/with-endpoint-routes/src/pages/images/[image].svg.ts lines 5–16

export async function GET({ params }) {
	return new Response(
		`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 200">
	<title>${params.image}</title>
</svg>`,
		{
			headers: {
				'content-type': 'image/svg+xml',
			},
		}
	);
}

Subdomains

Frequently Asked Questions

What does GET() do?
GET() is a function in the astro codebase, defined in packages/astro/test/fixtures/with-endpoint-routes/src/pages/images/[image].svg.ts.
Where is GET() defined?
GET() is defined in packages/astro/test/fixtures/with-endpoint-routes/src/pages/images/[image].svg.ts at line 5.

Analyze Your Own Codebase

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

Try Supermodel Free