    :secure (.isSecure cookie)
    :max-age (.maxAge cookie)})
 
+(defn get-cookies*
+  "Get the incoming cookies."
+  {:internal true :no-doc true}
+  [^Request request]
+  (persistent!
+   (reduce (fn [acc cookie]
+             (let [name (keyword (.name cookie))]
+               (assoc! acc name (cookie->map cookie))))
+           (transient {})
+           (into [] (.getCookies request)))))
+
 (defn get-cookies
   "Get the incoming cookies."
   [^DefaultContext context]
-  (let [^Request request (:catacumba/request context)]
-    (persistent!
-     (reduce (fn [acc cookie]
-               (let [name (keyword (.name cookie))]
-                 (assoc! acc name (cookie->map cookie))))
-             (transient {})
-             (into [] (.getCookies request))))))
+  (get-cookies* (:catacumba/request context)))
 
 (defn set-status!
   "Set the response http status."

                 (reduce #(utils/assoc-conj! %1 key %2) acc values)))
             (transient {})
             (.keySet headers)))))

(defn set-headers!
  [^DefaultContext context headers]

             (transient {})
             (.keySet params)))))

(defn get-query-params
  "Parse query params from context and return a
  maybe multivalue map."
  [^DefaultContext context]
  (get-query-params* (:catacumba/request context)))

(defn get-route-params*
  "Return a hash-map with parameters extracted from
  routing patterns."
  [^Context ctx]
  (into {} utils/keywordice-keys-t (.getPathTokens ctx)))

(defn get-route-params
  "Return a hash-map with parameters extracted from
  routing patterns."
  [^DefaultContext context]
  (get-route-params* (:catacumba/context context)))

(defn get-headers*
  [^Request request]
  (let [^Headers headers (.getHeaders request)
        ^MultiValueMap headers (.asMultiValueMap headers)]
    (persistent!
     (reduce (fn [acc ^String key]
               (let [values (.getAll headers key)
