I don't see any problem with your code. Try to add :debug true to both of 
those maps and look at the output.  Ensure that for both URLs share exact 
same hostname and protocol http/https.  Look at the Set-Cookie header in 
the POST response and ensure that the path matches the url in the GET. 

On Sunday, November 8, 2015 at 8:15:17 PM UTC-8, Mike wrote:
>
> Hello,
>
> I have a web site that uses cookies for authentication.  You logon to a 
> specific URL with your username and password using a POST (which I have 
> working; I get a 200 status back) which should create a cookie; then you 
> use the cookie for all future access to the web site.
>
> I have all of this working on a Windows client using PowerShell.  I'm 
> trying to expand my horizons and start using Clojure for my projects.  So 
> I'm trying to take my working PowerShell script and re-implement it in 
> Clojure.
>
> I read the section in the *clj-http.client* documentation about using a 
> cookie store and I thought I did it correctly.  Here's what I did:
>
> (require '[clj-http.client :as client])
>
> (def my-cs (clj-http.cookies/cookie-store))
>   (client/post login-URL {:body post-data
>                           :cookie-store my-cs})
>   (client/get customer-list-URL {:cookie-store my-cs})
>
> I was hoping to get a cookie shoved into *my-cs* and then be able to use 
> it in future accesses.  The *client/post* call gets a 200 status back, 
> but when I try to look at *my-cs* it is *nil*. What am I doing wrong? 
>  TIA!
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to