You need to specify the base url string as the first argument, and the map is an optional second argument:
(client/get "http://..." {:query-params {"CA" ...}}) On Wed, Jul 20, 2011 at 10:46 AM, octopusgrabbus <octopusgrab...@gmail.com>wrote: > On Jul 20, 10:26 am, Ulises <ulises.cerv...@gmail.com> wrote: > > try passing a map such as {:query-params {"CA" ca, "street" street ...}}. > > > > I've tried a few variations of the following but with no luck. > > (client/get {:query-params {"CA" "1", "STREET" "625 OX ST", "STREET2" > " ", "CITY" "SPRINGFIELD", "ZIP" "99999"}}) > java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot > be cast to java.lang.String (NO_SOURCE_FILE:0) > > > > > > > > > > > > > > > > > > > > > > > (require '[clj-http.client :as client]) > > > (defn make-url [ca street-1 street-2 city state zip] > > > (let > > > [url " > http://MailVerify/Lookup/chkAddr.asp?CA=%s&street=%s&STREET2=%s&CITY=..."] > > > (format url ca street-1 street-2 city state zip))) > > > (client/get (make-url "xxx" "123 Some St" "Apt 24" "New York" "NY" > "10026")) > > > > > On Wed, Jul 20, 2011 at 10:09 AM, octopusgrabbus < > octopusgrab...@gmail.com> > > > wrote: > > > > >> I've been looking at the examples for clj-http. I'm trying to map the > > >> perl string (below) to clj-http's parameters. > > > > >> $gInputUrl = "http://MailVerify/Lookup/chkAddr.asp" . "?CA=" . $gCa . > > >> "&STREET=" . $gAddrSubst1 . "&STREET2=" . $gAddrSubst2 . "&CITY=" . > > >> $gCity . "&STATE=" . $gState . "&ZIP=" . $zip4Local; > > > > >> Could someone point me to a similar get string? > > > > >> Thanks. > > >> cmn > > > > >> -- > > >> You received this message because you are subscribed to the Google > > >> Groups "Clojure" group. > > >> To post to this group, send email to clojure@googlegroups.com > > >> Note that posts from new members are moderated - please be patient > with > > >> your first post. > > >> To unsubscribe from this group, send email to > > >> clojure+unsubscr...@googlegroups.com > > >> For more options, visit this group at > > >>http://groups.google.com/group/clojure?hl=en > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Clojure" group. > > > To post to this group, send email to clojure@googlegroups.com > > > Note that posts from new members are moderated - please be patient with > your > > > first post. > > > To unsubscribe from this group, send email to > > > clojure+unsubscr...@googlegroups.com > > > For more options, visit this group at > > >http://groups.google.com/group/clojure?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en