UNPKG

next

Version:

The React Framework

12 lines (11 loc) 744 B
import { type ReadonlyHeaders } from '../web/spec-extension/adapters/headers'; /** * This function allows you to read the HTTP incoming request headers in * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components), * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations), * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers) and * [Middleware](https://nextjs.org/docs/app/building-your-application/routing/middleware). * * Read more: [Next.js Docs: `headers`](https://nextjs.org/docs/app/api-reference/functions/headers) */ export declare function headers(): Promise<ReadonlyHeaders>;