Skip to content

Commit

Permalink
Fixed Phil's booboo. add-query-params now takes a map of query parame…
Browse files Browse the repository at this point in the history
…ters. Reason being, you can't simply apply a map of parameters, so if you had a map, you'd have to make it something applyable to add-query-params. I think a map "feels better" for this problem anyway.
  • Loading branch information
Raynes authored and technomancy committed Jun 10, 2010
1 parent 39dda13 commit 540a8a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clojure_http/client.clj
Expand Up @@ -106,8 +106,8 @@ by a server."
cookie-map)))

(defn add-query-params
"Takes a URL and query params and returns a URL with query params attached."
[url & query-params]
"Takes a URL and a map of query params and returns a URL with query params attached."
[url query-params]
(if (seq query-params)
(apply str url "?"
(interpose "&" (for [[k v] query-params]
Expand Down

0 comments on commit 540a8a9

Please sign in to comment.