mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This ensures we properly check for the none cached content correctly x-ref: https://github.com/vercel/next.js/actions/runs/4351711739/jobs/7603961011
26 lines
570 B
JavaScript
26 lines
570 B
JavaScript
export default async function Page() {
|
|
const data = await fetch(
|
|
new Request('https://next-data-api-endpoint.vercel.app/api/random', {
|
|
method: 'POST',
|
|
})
|
|
).then((res) => res.text())
|
|
|
|
const data2 = await fetch(
|
|
new URL('https://next-data-api-endpoint.vercel.app/api/random'),
|
|
{
|
|
method: 'POST',
|
|
next: {
|
|
revalidate: 0,
|
|
},
|
|
}
|
|
).then((res) => res.text())
|
|
|
|
return (
|
|
<>
|
|
<p id="page">/variable-revalidate/post-method</p>
|
|
<p id="page-data">{data}</p>
|
|
<p id="page-data2">{data2}</p>
|
|
</>
|
|
)
|
|
}
|