• (wrap-cookies handler)
Parses the cookies in the request map, then assocs the resulting map
to the :cookies key on the request.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source ring/middleware/cookies.clj:116 top

(defn wrap-cookies
  "Parses the cookies in the request map, then assocs the resulting map
  to the :cookies key on the request."
  [handler]
  (fn [request]
    (let [request (if (request :cookies)
                    request
                    (assoc request :cookies (parse-cookies request)))]
      (-> (handler request)
        (set-cookies)
        (dissoc :cookies)))))
Vars in ring.middleware.cookies/wrap-cookies: -> defn dissoc fn let
Used in 0 other vars

Comments top

No comments for wrap-cookies. Log in to add a comment.