Skip to content

Instantly share code, notes, and snippets.

@jbrechtel
Created July 1, 2013 17:26
Show Gist options
  • Save jbrechtel/5902813 to your computer and use it in GitHub Desktop.
Save jbrechtel/5902813 to your computer and use it in GitHub Desktop.
(ns middler-clojure.core
(:use org.httpkit.server)
(:use clojure.walk)
(:require [org.httpkit.client :as http])
(:gen-class))
(defn app [req]
(println req)
(let [uri (:uri req)]
(println (class uri))
(with-channel req channel
(println uri)
(send! channel (update-in @(http/get uri) [:headers] stringify-keys)))))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(run-server app {:port 8080})) ; Ring server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment