Permalink
Browse files

rm dep on clj-apache-httprm dep on clj-apache-http

  • Loading branch information...
1 parent 8e75a46 commit 79894f35977ce76b70d54f8e2b229d9d0fbcd37f @tavisrudd committed Jan 13, 2012
Showing with 5 additions and 8 deletions.
  1. +1 −3 project.clj
  2. +4 −5 src/oauth/client.clj
View
@@ -2,6 +2,4 @@
:description "OAuth support for Clojure"
:repositories {"snapshots" {:url "s3p://lein-snapshots/snapshots"}}
:dependencies [[org.clojure/clojure "1.3.0"]
- [com.twinql.clojure/clj-apache-http "2.3.2-SNAPSHOT"]
- [clj-http "0.2.7"]
- ])
+ [clj-http "0.2.7"]])
View
@@ -4,7 +4,6 @@
oauth.client
(:require [oauth.digest :as digest]
[oauth.signature :as sig]
- [com.twinql.clojure.http :as http]
[clj-http.client :as httpclient]
[clj-http.util :as httputil]
)
@@ -28,8 +27,8 @@
"Builds the URI to the Service Provider where the User will be prompted
to approve the Consumer's access to their account."
[consumer token]
- (.toString (http/resolve-uri (:authorize-uri consumer)
- {:oauth_token token})))
+ (str (:authorize-uri consumer)
+ "?" (httpclient/generate-query-string {:oauth_token token})))
(defn authorization-header
"OAuth credentials formatted for the Authorization HTTP header."
@@ -55,7 +54,7 @@ to approve the Consumer's access to their account."
[(keyword (sig/url-decode k)) (sig/url-decode v)]))
(split s #"&")))))
-(defn- check-success-response2 [m]
+(defn- check-success-response [m]
(let [code (:status m)]
(if (or (< code 200)
(>= code 300))
@@ -69,7 +68,7 @@ to approve the Consumer's access to their account."
:parameters (http/map->params {:use-expect-continue false})
:as :urldecoded))
(form-decode
- (:body (check-success-response2
+ (:body (check-success-response
(httpclient/post url req)))))
(defn oauth-post-request-decoded [url oauth-params & [form-params]]

0 comments on commit 79894f3

Please sign in to comment.