Fork me on GitHub
Matthew Davidson (kingmob)08:04:54

@lkorogodski Not exactly. When starting the server, you could pass in :raw-stream? true , which will prevent Aleph from turning the netty ByteBuf objects into an InputStream, but instead, you’ll get a Manifold stream of ByteBufs. If you want to aggregate the whole request body into a byte[], you probably want to use something like clj-commons.byte-streams/to-byte-array . The byte-streams library was built to work with the underlying streams of Aleph. Also, check out the examples/ subdirectory to see uses of byte-streams in action.

Leonid Korogodski13:04:19

Ok, thanks. I just wanted to spare myself some pain with the middleware that reads the response body. Came across a malli bug when validating the payload.

👍 1
Leonid Korogodski13:04:28

Post-validation, the body became nil .