Created
July 1, 2013 17:26
-
-
Save jbrechtel/5902813 to your computer and use it in GitHub Desktop.
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
(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