GET() — astro Function Reference
Architecture documentation for the GET() function in users.json.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 59e13493_833c_e46a_c1b9_ce2f7ef38d00["GET()"] e5083177_9db8_ad8b_abfd_c367843df6ce["users.json.js"] 59e13493_833c_e46a_c1b9_ce2f7ef38d00 -->|defined in| e5083177_9db8_ad8b_abfd_c367843df6ce style 59e13493_833c_e46a_c1b9_ce2f7ef38d00 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmark/static-projects/build-server/src/pages/api/users.json.js lines 1–18
export async function GET({ params, request }) {
const users = Array.from({ length: 50 }, (_, i) => ({
id: i + 1,
name: `User ${i + 1}`,
email: `user${i + 1}@example.com`,
active: Math.random() > 0.5,
}));
return new Response(JSON.stringify({
timestamp: new Date().toISOString(),
users,
}), {
status: 200,
headers: {
'Content-Type': 'application/json'
}
});
}
Domain
Subdomains
Source
Frequently Asked Questions
What does GET() do?
GET() is a function in the astro codebase, defined in benchmark/static-projects/build-server/src/pages/api/users.json.js.
Where is GET() defined?
GET() is defined in benchmark/static-projects/build-server/src/pages/api/users.json.js at line 1.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free