Skip to main content
Within the Nuxt context you can use useRequestEvent to access the incoming request.
In the browser, useRequestEvent will return undefined.

Parameters

This composable does not take any parameters.

Return Values

H3Event | undefined
The h3 event object for the current request. Returns undefined on the client side.
string
The URL path of the request.
object
Node.js request and response objects.

Type