Skip to content

Instantly share code, notes, and snippets.


tobias/core.clj Secret

Created May 3, 2017
What would you like to do?
(ns head.core
(:require [immutant.web :as web]
[immutant.web.async :as async])
(defn handler
(async/as-channel req
:on-open (fn [ch]
(if (= :head (:request-method req))
(async/send! ch "" :on-success (partial async/close ch))
(async/send! ch "foo")))))
(defn -main [& args]
(web/run handler))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment