Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1 from nicoo/master

update clj-http to 0.2.7
  • Loading branch information...
commit c0309940f121a36d9782183aec039da9f52040c3 2 parents d9fef8f + 181c04d
@ngrunwald ngrunwald authored
Showing with 6 additions and 2 deletions.
  1. +1 −1  project.clj
  2. +5 −1 src/clj_spore/generator.clj
View
2  project.clj
@@ -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"]])
View
6 src/clj_spore/generator.clj
@@ -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 []}
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.