Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
6
Task/HTTP/Clojure/http-1.clj
Normal file
6
Task/HTTP/Clojure/http-1.clj
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(defn get-http [url]
|
||||
(let [sc (java.util.Scanner.
|
||||
(.openStream (java.net.URL. url)))]
|
||||
(while (.hasNext sc)
|
||||
(println (.nextLine sc)))))
|
||||
(get-http "http://www.rosettacode.org")
|
||||
4
Task/HTTP/Clojure/http-2.clj
Normal file
4
Task/HTTP/Clojure/http-2.clj
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
(ns example
|
||||
(:use [clojure.contrib.http.agent :only (string http-agent)]))
|
||||
|
||||
(println (string (http-agent "http://www.rosettacode.org/")))
|
||||
1
Task/HTTP/Clojure/http-3.clj
Normal file
1
Task/HTTP/Clojure/http-3.clj
Normal file
|
|
@ -0,0 +1 @@
|
|||
(print (slurp "http://www.rosettacode.org/"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue