mpenet / jet

[not maintained, use at own risk] Jetty9 ring server adapter with WebSocket support via core.async and Jetty9 based HTTP & WebSocket clients (jvm based, no cljs)
http://mpenet.github.io/jet/
167 stars 19 forks source link

server side reading HTTP input #38

Closed nicferrier closed 8 years ago

nicferrier commented 8 years ago

When receving a request via an async channel, if the server has sent a request body I presume that is NOT available as a channel?

Instead I have to read that conventionally, as I would in Java?

mpenet commented 8 years ago

Hi,

It's not super clear what context you are refering to (since jet has both client/server it's a bit confusing):

if you mean reading the :body key in a request map from the server side, yes, it's an inputstream.

nicferrier commented 8 years ago

That's what I meant, it's an InputStream, not a channel.

mpenet commented 8 years ago

We could add a server option that make the receive happen in a channel since I believe the jetty9 api can allow to control how/when (exert backpressure) we receive it. That would make sense given the current jet api.

nicferrier commented 8 years ago

It would. But I'll handle it with an input stream for now.