MCPcopy
hub / github.com/vercel/next.js / getRequestMeta

Function getRequestMeta

packages/next/src/server/request-meta.ts:355–361  ·  view source on GitHub ↗
(
  req: NextIncomingMessage,
  key?: K
)

Source from the content-addressed store, hash-verified

353 key: K
354): RequestMeta[K]
355export function getRequestMeta<K extends keyof RequestMeta>(
356 req: NextIncomingMessage,
357 key?: K
358): RequestMeta | RequestMeta[K] {
359 const meta = req[NEXT_REQUEST_META] || {}
360 return typeof key === 'string' ? meta[key] : meta
361}
362
363/**
364 * Sets the request metadata.

Callers 15

renderToHTMLImplFunction · 0.90
runApiMethod · 0.90
renderHTMLImplMethod · 0.90
NextNodeServerClass · 0.90
runMiddlewareMethod · 0.90
runEdgeFunctionMethod · 0.90
base-server.tsFile · 0.90
handleRequestFunction · 0.90
handleRequestImplFunction · 0.90
renderImplFunction · 0.90
setVaryHeaderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected