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!