Hi! I need to manually turn a Netty request into a Ring request. I'm trying to use aleph.http.core/netty-request->ring-request
(I know this is frowned upon). What type is body
supposed to be, and where does it come from? Isn't that already contained in the HttpRequest
from Netty?
Body for a ring request can kinda be whatever you want
sometimes it's an input stream
sometimes it's a string
sometimes it's a hydrated JSON object
depends what kind of middleware you're using
In aleph, I think it's coerced to an input-stream mostly: https://github.com/ztellman/aleph/blob/cc0f2a5319fef6c0cde4372c7435316aef27a960/src/aleph/http/server.clj#L253-L275 (see the args to handle-request
)
I think a Netty HttpRequest
is much more bare, just method, URI, and protocol version