Skip to content

Commit

Permalink
Merge pull request ngrunwald#1 from nicoo/master
Browse files Browse the repository at this point in the history
update clj-http to 0.2.7
  • Loading branch information
ngrunwald committed Jan 23, 2012
2 parents d9fef8f + 181c04d commit c030994
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion project.clj
Expand Up @@ -3,6 +3,6 @@
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
[cheshire "2.0.4"]
[clj-http "0.2.5"]
[clj-http "0.2.7"]
[slingshot "0.9.0"]]
:dev-dependencies [[clj-stacktrace "0.2.4"]])
6 changes: 5 additions & 1 deletion src/clj_spore/generator.clj
Expand Up @@ -103,6 +103,10 @@
(merge {:status 599} obj)
obj)))

(defn if-pos
[v]
(if (and v (pos? v)) v))

(defn generate-spore-method
([{:keys [name author version], api_base_url :base_url, api_format :format
:or {api_format []}
Expand Down Expand Up @@ -141,7 +145,7 @@
:request-uri ""
:query-string ""
:server-name (.getHost base_uri)
:server-port (or (client/if-pos (.getPort base_uri)) (if (= scheme "https") 443 80))
:server-port (or (if-pos (.getPort base_uri)) (if (= scheme "https") 443 80))
:body (:payload user-params)
:params (dissoc user-params :payload)
:scheme scheme
Expand Down

0 comments on commit c030994

Please sign in to comment.