Fork me on GitHub
#pedestal
<
2018-08-31
>
ikitommi08:08:31

Is there a reason why handler can’t return a core.async channel?

ddeaguiar13:08:33

@ikitommi you can return a core.async channel as the response body in your handler if the container implementation implements the WriteNIOByteBody protocol. See http://pedestal.io/reference/response-bodies.

ddeaguiar13:08:48

Jetty and Immutant do

ikitommi13:08:41

thanks @ddeaguiar I think there are three async-cases: 1) interceptor returns a async context => works 2) handler function returns a async response => doesn’t 3) response has a async body => works (didn’t test thou)

ddeaguiar13:08:10

only 1 and 3

ikitommi13:08:44

ok, thanks.