Download next.js/test/e2e/app-dir/app-static/app/route-handler/post/route.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 267 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-static/app/route-handler/post/route.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/app-static/app/route-handler/post/route.js
-
curl -L -o route.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-static/app/route-handler/post/route.js
267 Bytes
| import { NextResponse } from 'next/server' | |
| export async function POST() { | |
| const data = await fetch( | |
| 'https://next-data-api-endpoint.vercel.app/api/random', | |
| { | |
| method: 'POST', | |
| } | |
| ).then((res) => res.text()) | |
| return NextResponse.json({ data }) | |
| } | |