I've just seen this library https://github.com/technomancy/clojure-http-client with this snippet of code on the README page which is what I'm looking to do
(res/with-cookies {}
(res/post "http://localhost:3000/login" {} {"user" user "password" password})
(res/get "http://localhost:3000/my-secret-page))
However it appears that the lib is deprecated and it advises you to use the clj-http library instead. I'm just wondering if anyone knows how to replicate this sort of behaviour using that library?
At the moment I just do
(post "<site i want to login to>" {:form-params {:username "<my username>" :password "<my password>"}})
Which returns a cookie that has a http 302 redirect to the authenticated page, but I have no idea how to make the client follow this redirect using the authenticated cookie
Any help would be appreciated.