Re: Constructing clj-http Get Query

2011-07-20 Thread octopusgrabbus
That's it. Thanks. user=> (client/get "http://MailVerify/Lookup/chkAddr.asp"; {:query- params {"CA" "1", "STREET" "909 FROTHINGVALE ST", "STREET2" " ", "CITY" "MADEUPVILLE", "STATE" "MA", "ZIP" "02474"}}) On Jul 20, 10:49 am, Mark Rathwell wrote: > You need to specify the base url string as the

Re: Constructing clj-http Get Query

2011-07-20 Thread Mark Rathwell
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 wrote: > On Jul 20, 10:26 am, Ulises wrote: > > try passing a map such as {:query-pa

Re: Constructing clj-http Get Query

2011-07-20 Thread octopusgrabbus
On Jul 20, 10:26 am, Ulises 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" "9"}}) java.l

Re: Constructing clj-http Get Query

2011-07-20 Thread Michael Wood
On 20 July 2011 16:38, octopusgrabbus wrote: > Thanks. That creates a great URL string, but when passed into (client/ > get > gets this error: > > java.lang.IllegalArgumentException (NO_SOURCE_FILE:0) When you get that, try: (.printStackTrace *e) It might give you more useful information about

Re: Constructing clj-http Get Query

2011-07-20 Thread octopusgrabbus
Thanks. That creates a great URL string, but when passed into (client/ get gets this error: java.lang.IllegalArgumentException (NO_SOURCE_FILE:0) cmn On Jul 20, 10:24 am, Mark Rathwell wrote: > (require '[clj-http.client :as client]) > > (defn make-url [ca street-1 street-2 city state zip] >   (

Re: Constructing clj-http Get Query

2011-07-20 Thread Mark Rathwell
> try passing a map such as {:query-params {"CA" ca, "street" street ...}}. Yes, much cleaner, sorry about that: (require '[clj-http.client :as client]) (def q { "CA" "xx" "STREET" "123 Some St" "STREET2" "Apt 24" "CITY" "New York" "STATE" "NY" "ZIP" "10026"}) (client/get "http://MailVerify/Loo

Re: Constructing clj-http Get Query

2011-07-20 Thread Ulises
try passing a map such as {:query-params {"CA" ca, "street" street ...}}. On 20 July 2011 16:24, Mark Rathwell wrote: > > (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

Re: Constructing clj-http Get Query

2011-07-20 Thread Mark Rathwell
(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=%s&STATE=%s&ZIP=%s "] (format url ca street-1 street-2 city state zip))) (client/get (make-url "xxx" "123 Some St" "A