We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
*cookie-store*
1 parent 3571ba0 commit 12242fbCopy full SHA for 12242fb
src/clj_http/core.clj
@@ -166,6 +166,8 @@
166
(def proxy-move-with-body (make-proxy-method-with-body :move))
167
(def proxy-patch-with-body (make-proxy-method-with-body :patch))
168
169
+(def ^:dynamic *cookie-store* nil)
170
+
171
(defn make-proxy-method [method url]
172
(doto (proxy [HttpRequestBase] []
173
(getMethod
@@ -273,8 +275,8 @@
273
275
request-method http-url body)]
274
276
(when-not (conn/reusable? conn-mgr)
277
(.addHeader http-req "Connection" "close"))
- (when cookie-store
- (.setCookieStore context cookie-store))
278
+ (when-let [cookie-jar (or cookie-store *cookie-store*)]
279
+ (.setCookieStore context cookie-jar))
280
(when-let [[user pass] digest-auth]
281
(.setCredentialsProvider
282
context
0 commit comments