Skip to content

Instantly share code, notes, and snippets.

@shakdwipeea
Created May 12, 2017 16:50
Show Gist options
  • Save shakdwipeea/b23b92bd174d01fe5de506f6dcd0a647 to your computer and use it in GitHub Desktop.
Save shakdwipeea/b23b92bd174d01fe5de506f6dcd0a647 to your computer and use it in GitHub Desktop.
immutant async hander
(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