Created
May 12, 2017 16:50
-
-
Save shakdwipeea/b23b92bd174d01fe5de506f6dcd0a647 to your computer and use it in GitHub Desktop.
immutant async hander
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn send-async-response [request async-handler] | |
(response/ok (:body (as-channel | |
request | |
{:on-open #(send! % (async-handler) {:close? true})})))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment