Download next.js/test/integration/api-support/pages/api/status-204.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 226 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/api-support/pages/api/status-204.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/integration/api-support/pages/api/status-204.js
-
curl -L -o status-204.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/api-support/pages/api/status-204.js
226 Bytes
| export default function handler(req, res) { | |
| if (req.query.invalid) { | |
| // test the warning when content is added for a 204 response | |
| return res.status(204).json({ hello: 'world' }) | |
| } | |
| return res.status(204).send() | |
| } | |