diff --git a/.gitignore b/.gitignore index 9de44e3..8fa8c63 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .*sw* *.jar *.class +.lein-* diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..6db353c --- /dev/null +++ b/pom.xml @@ -0,0 +1,75 @@ + + 4.0.0 + com.twinql.clojure + clj-apache-http + 2.3.1 + clj-apache-http + Clojure HTTP library using the Apache HttpClient. + + scm:git:git://github.com/roman/clj-apache-http.git + scm:git:ssh://git@github.com/roman/clj-apache-http.git + 3d3de1da943ec7dfac5c7c419f5a31efdbf368ff + https://github.com/roman/clj-apache-http + + + src + test + + + resources + + + + + test-resources + + + + + + central + http://repo1.maven.org/maven2 + + + clojars + http://clojars.org/repo/ + + + + + org.clojure + clojure + 1.3.0 + + + org.clojure + data.json + 0.1.2 + + + org.apache.httpcomponents + httpcore + 4.0.1 + + + org.apache.httpcomponents + httpmime + 4.0.1 + + + commons-logging + commons-logging + 1.1.1 + + + org.apache.httpcomponents + httpclient + 4.0.1 + + + + diff --git a/project.clj b/project.clj index 097e295..2d76532 100644 --- a/project.clj +++ b/project.clj @@ -1,8 +1,7 @@ -(defproject com.twinql.clojure/clj-apache-http "2.3.1" +(defproject com.twinql.clojure/clj-apache-http "2.3.2-SNAPSHOT" :description "Clojure HTTP library using the Apache HttpClient." - :dev-dependencies [[leiningen/lein-swank "1.1.0"]] - :dependencies [[org.clojure/clojure "1.2.0"] - [org.clojure/clojure-contrib "1.2.0"] + :dependencies [[org.clojure/clojure "1.3.0"] + [org.clojure/data.json "0.1.2"] [org.apache.httpcomponents/httpcore "4.0.1"] [org.apache.httpcomponents/httpmime "4.0.1"] [commons-logging/commons-logging "1.1.1"] diff --git a/src/com/twinql/clojure/http.clj b/src/com/twinql/clojure/http.clj index fe93845..79bbc9a 100644 --- a/src/com/twinql/clojure/http.clj +++ b/src/com/twinql/clojure/http.clj @@ -2,8 +2,8 @@ (:refer-clojure :exclude [get]) (:use clojure.set) (:require - [clojure.contrib.io :as io] - [clojure.contrib.json :as json]) + [clojure.java.io :as io] + [clojure.data.json :as json]) (:import (java.lang Exception) (java.net URI) @@ -205,17 +205,17 @@ (defmethod entity-as :string [#^HttpEntity entity as status] (with-open [#^InputStream stream (.getContent entity)] - (io/slurp* stream))) + (slurp stream))) ;;; JSON handling. ;;; We prefer keywordizing. (defmethod entity-as :json [#^HttpEntity entity as status] (with-open [#^InputStream stream (.getContent entity)] - (clojure.contrib.json/read-json (io/reader stream) true))) + (json/read-json (io/reader stream) true))) (defmethod entity-as :json-string-keys [#^HttpEntity entity as status] (with-open [#^InputStream stream (.getContent entity)] - (clojure.contrib.json/read-json (io/reader stream) false))) + (json/read-json (io/reader stream) false))) ;;; To avoid overhead in shutting down a ClientConnectionManager,