Skip to content

Instantly share code, notes, and snippets.

@tobias
Created February 13, 2014 23:57
Show Gist options
  • Save tobias/8986549 to your computer and use it in GitHub Desktop.
Save tobias/8986549 to your computer and use it in GitHub Desktop.
(ns example.http.client
(:require [vertx.http :as http]
[vertx.stream :as stream]))
(-> (http/client {:port 8080 :host "localhost"})
(http/get-now "/"
(fn [response]
(-> response
(stream/on-data
(fn [buffer]
;; do something with the data
))
(stream/on-end
#(println "That's all, folks!"))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment