Buckets:
| import { cookies } from 'next/headers' | |
| export const revalidate = 1 | |
| export const GET = async () => { | |
| const localCookies = await cookies() | |
| localCookies.set('foo', 'foo1') | |
| localCookies.set('bar', 'bar1') | |
| // Key, value, options | |
| localCookies.set('test1', 'value1', { secure: true }) | |
| // One object | |
| localCookies.set({ | |
| name: 'test2', | |
| value: 'value2', | |
| httpOnly: true, | |
| path: '/handler', | |
| }) | |
| // Cookies here will be merged with the ones above | |
| return new Response('Hello, world!', { | |
| headers: [ | |
| ['Content-Type', 'text/custom'], | |
| ['Set-Cookie', 'bar=bar2'], | |
| ['Set-Cookie', 'baz=baz2'], | |
| ], | |
| }) | |
| } | |
Xet Storage Details
- Size:
- 647 Bytes
- Xet hash:
- ace01a10a3a0632e7b050089a61959eec6ec7fb9c556ad0f44a80d996f2c18d6
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.