Fork me on GitHub
#ring-swagger
<
2017-07-09
>
vijayakkineni07:07:29

Hi All, How can i get access to the raw http request body as input stream in compojure-api? Any hints would be greatly appreciated.

ikitommi08:07:29

@vijayakkineni raw body is an InputStream and once read, it's gone. So, if the client has sent a body that is parsed, you can't access the stream anymore.

vijayakkineni16:07:47

@ikitommi i have a use case where i do no want the parsed json as map and schema enforcement, rather directly pipe the InputStream to the storage layer. Does that mean i have to write a custom muuntaja json decoder which converts the json to bytearray?