Skip to content

Glossary: Next.js Beyond the Basics

headers()

An async function from next/headers that returns the current request's headers. Reading it makes a page depend on the request, so it needs Suspense.

Where the book teaches it

Related terms

cookies()SuspenseHTTP header