> 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/Lookup/chkAddr.asp"; {:query-params q})



On Wed, Jul 20, 2011 at 10:26 AM, Ulises <[email protected]> wrote:

> try passing a map such as {:query-params {"CA" ca, "street" street ...}}.
>
> On 20 July 2011 16:24, Mark Rathwell <[email protected]> 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&CITY=%s&STATE=%s&ZIP=%s
> "]
> >     (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 <
> [email protected]>
> > 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 [email protected]
> >> Note that posts from new members are moderated - please be patient with
> >> your first post.
> >> To unsubscribe from this group, send email to
> >> [email protected]
> >> 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 [email protected]
> > Note that posts from new members are moderated - please be patient with
> your
> > first post.
> > To unsubscribe from this group, send email to
> > [email protected]
> > 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 [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to