Permalink
Browse files

Updating library to clojure version 1.3

  • Loading branch information...
1 parent 3d3de1d commit 5c0c24f56be761fa4c139cdab82d2a5dff03d027 @roman roman committed Jan 8, 2012
Showing with 83 additions and 7 deletions.
  1. +1 −0 .gitignore
  2. +75 −0 pom.xml
  3. +2 −2 project.clj
  4. +5 −5 src/com/twinql/clojure/http.clj
View
@@ -2,3 +2,4 @@
.*sw*
*.jar
*.class
+.lein-*
View
75 pom.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?><project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.twinql.clojure</groupId>
+ <artifactId>clj-apache-http</artifactId>
+ <version>2.3.1</version>
+ <name>clj-apache-http</name>
+ <description>Clojure HTTP library using the Apache HttpClient.</description>
+ <scm>
+ <connection>scm:git:git://github.com/roman/clj-apache-http.git</connection>
+ <developerConnection>scm:git:ssh://git@github.com/roman/clj-apache-http.git</developerConnection>
+ <tag>3d3de1da943ec7dfac5c7c419f5a31efdbf368ff</tag>
+ <url>https://github.com/roman/clj-apache-http</url>
+ </scm>
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <testSourceDirectory>test</testSourceDirectory>
+ <resources>
+ <resource>
+ <directory>resources</directory>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>test-resources</directory>
+ </testResource>
+ </testResources>
+ </build>
+ <repositories>
+ <repository>
+ <id>central</id>
+ <url>http://repo1.maven.org/maven2</url>
+ </repository>
+ <repository>
+ <id>clojars</id>
+ <url>http://clojars.org/repo/</url>
+ </repository>
+ </repositories>
+ <dependencies>
+ <dependency>
+ <groupId>org.clojure</groupId>
+ <artifactId>clojure</artifactId>
+ <version>1.3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.clojure</groupId>
+ <artifactId>data.json</artifactId>
+ <version>0.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore</artifactId>
+ <version>4.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpmime</artifactId>
+ <version>4.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
+<!-- This file was autogenerated by Leiningen.
+ Please do not edit it directly; instead edit project.clj and regenerate it.
+ It should not be considered canonical data. For more information see
+ https://github.com/technomancy/leiningen -->
View
@@ -1,7 +1,7 @@
(defproject com.twinql.clojure/clj-apache-http "2.3.1"
:description "Clojure HTTP library using the Apache HttpClient."
- :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"]
@@ -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,

0 comments on commit 5c0c24f

Please sign in to comment.