Skip to content

Instantly share code, notes, and snippets.

@tobias

tobias/core.clj Secret

Created May 3, 2017
Embed
What would you like to do?
(ns head.core
(:require [immutant.web :as web]
[immutant.web.async :as async])
(:gen-class))
(defn handler
[req]
(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