Documentación offline Nuxt main

useRequestEvent

main Documentación oficial Licencia MITDescargado el 2026-08-02

Within the Nuxt context you can use useRequestEvent to access the incoming request.

// Get underlying request event
const event = useRequestEvent()

// Get the URL
const url = event?.path

::tip In the browser, useRequestEvent will return undefined. ::