Skip to content

Commit 553d447

Browse files
committed
Merge branch 'pr/218'
2 parents 0cc598f + 0f21062 commit 553d447

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/clj_http/cookies.clj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,13 @@
137137
[^CookieStore cookie-store]
138138
(when cookie-store
139139
(into {} (map to-cookie (.getCookies cookie-store)))))
140+
141+
(defn add-cookie
142+
"Add a ClientCookie to a cookie-store"
143+
[^CookieStore cookie-store ^ClientCookie cookie]
144+
(.addCookie cookie-store cookie))
145+
146+
(defn clear-cookies
147+
"Clears all cookies from cookie-store"
148+
[^CookieStore cookie-store]
149+
(.clear cookie-store))

0 commit comments

Comments
 (0)