We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS: WSL Ubuntu 22.04
Bun version: 1.0.36
Bunrest version: ^1.3.8
My code:
app.get("/api/v1/one/:name/:id", async (req, res) => { const name = req.params?.name; const id = req.params?.id; if (!id) { return res.status(StatusCodes.BAD_REQUEST).json({error: `No ${name} ID provided`}); } const itemData = await redisClient.get(`${name}:${id}`); if (!itemData) { return res.status(StatusCodes.NOT_FOUND).json({error: `${name} not found`}); } const item = JSON.parse(itemData); res.json({id, ...item}); }
output for every 30 minutes:
250 | newReq.body = bodyStr 251 | } 252 | req.arrayBuffer; 253 | newReq.blob = req.blob(); ^ error: Body already used at /opt/myprojectname/node_modules/bunrest/src/server/server.ts:253:19
The text was updated successfully, but these errors were encountered:
second here:
router.options('/endpoint', (req, res) => { setCORS(res, req.headers?.origin) return res.status(200).send('') }) router.post('/endpoint', async (req, res) => { console.log("RECEIVED", req.request.headers.get('content-type')) const formdata = await req.request.formData() }
RECEIVED multipart/form-data; boundary=----WebKitFormBoundaryUfva7xqfDDwlvLFu api-service-1 | 415 | console.log("RECEIVED", req.request.headers.get('content-type')) api-service-1 | 416 | const formdata = await req.request.formData() api-service-1 | ^ api-service-1 | error: Body already used api-service-1 | at /app/src/Router.ts:419:28 api-service-1 | at /app/src/Router.ts:413:36 api-service-1 | at /app/node_modules/bunrest/src/server/server.ts:211:26 api-service-1 | POST - http://localhost:4000/endpoint failed
Sorry, something went wrong.
No branches or pull requests
OS: WSL Ubuntu 22.04
Bun version: 1.0.36
Bunrest version: ^1.3.8
My code:
output for every 30 minutes:
The text was updated successfully, but these errors were encountered: