useRequestEvent to access the incoming request.
Parameters
This composable does not take any parameters.Return Values
H3Event | undefined
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Access the incoming request event with the useRequestEvent composable.
useRequestEvent to access the incoming request.
// Get underlying request event
const event = useRequestEvent()
// Get the URL
const url = event?.path
useRequestEvent will return undefined.export function useRequestEvent(): H3Event | undefined