Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defn get-stream []
(let [conn #^java.net.HttpURLConnection
(http-connection "http://stream.twitter.com/1/statuses/sample.json")]
(.setDoInput conn true)
(.setRequestProperty conn
"Authorization"
(str "Basic " (base64/encode-str
"USERNAME:PASSWORD")))
(.getInputStream conn)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.