Svelte · Senior · Question 72 of 75
What does getRequestEvent from $app/server allow?
- ✓Correct answer: Accessing the current request event (cookies, locals, url) in shared server code called from load, actions or remote functions, without passing it through
- 2Reading the request in the browser
- 3Creating fake requests in tests
Explanation
Useful for helpers like requireUser() used across many server functions.