Unverified Commit 2781b8eb authored by Maedah Batool's avatar Maedah Batool Committed by GitHub

Improve Middleware Set Cookie API documentation (#31707)

parent 7be75bbf
...@@ -63,6 +63,7 @@ import type { NextFetchEvent } from 'next/server' ...@@ -63,6 +63,7 @@ import type { NextFetchEvent } from 'next/server'
The `NextResponse` object is an extension of the native [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) interface, with the following added methods and properties: The `NextResponse` object is an extension of the native [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) interface, with the following added methods and properties:
- `cookies` - An object with the cookies in the `Response` - `cookies` - An object with the cookies in the `Response`
- `cookie` - Set a cookie in the `Response`
- `redirect()` - Returns a `NextResponse` with a redirect set - `redirect()` - Returns a `NextResponse` with a redirect set
- `rewrite()` - Returns a `NextResponse` with a rewrite set - `rewrite()` - Returns a `NextResponse` with a rewrite set
- `next()` - Returns a `NextResponse` that will continue the middleware chain - `next()` - Returns a `NextResponse` that will continue the middleware chain
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment