lau1944 / bunrest

An express-like API for bun server
MIT License
285 stars 31 forks source link

Raw request body? #9

Closed mmcc closed 1 year ago

mmcc commented 1 year ago

Hi there, I was playing around with bunrest a bit for a weekend project and I've found myself in a situation where I need to access the raw request body. I'm not seeing anything immediately obvious in the docs, and trying to access things via req.request.body eventually end up with an error that Body is already used.

Any ideas?

lau1944 commented 1 year ago

req.request is a bun request object, there is no body variable. You can try req.body instead.