250217 월 TIL
Next.js에서 쿠키 사용하기클라이언트 컴포넌트에서 쿠키 사용const response = await client.POST("/api/posts", { body: { title, content, }, credentials: "include", });클라이언트 컴포넌트는 브라우저에서 실행됨.쿠키를 불러올 때 credentials: "include" 옵션을 설정하면 자동으로 포함됨.서버 컴포넌트에서 쿠키 사용const response = await client.GET("/api/posts/{id}", { params: { path: { id, }, }, headers: { cookie: ..