   (set-headers* [_ _]
     (throw (UnsupportedOperationException.)))
 
-  Response
+  ResponseMetaData
   (get-headers* [_]
     (throw (UnsupportedOperationException.)))
 
-  (set-headers* [^Response response headers]
+  (set-headers* [^ResponseMetaData response headers]
     (let [^MutableHeaders headersmap (.getHeaders response)]
       (loop [headers headers]
         (when-let [[key vals] (first headers)]
           (.set headersmap (name key) vals)
           (recur (rest headers)))))))
-
 
 (defn- cookie->map
   [^Cookie cookie]

  (set-status* [^DefaultContext ctx ^long status]
    (set-status* (:response ctx) status))

  Response
  (set-status* [^Response response ^long status]
    (.status response status)))

(extend-protocol IRequest

  (get-cookies* [^Request request]
    (persistent!
     (reduce (fn [acc ^Cookie cookie]
               (let [name (keyword (.getName cookie))]
                 (assoc! acc name (cookie->map cookie))))
             (transient {})
             (into [] (.getCookies request)))))

  (set-cookies* [_ _]
    (throw (UnsupportedOperationException.)))

  ResponseMetaData
  (get-cookies* [_]
    (throw (UnsupportedOperationException.)))

  (set-cookies* [^ResponseMetaData response cookies]
    (loop [cookies (into [] cookies)]
      (when-let [[cookiename cookiedata] (first cookies)]
        (let [^Cookie cookie (.cookie response (name cookiename) "")]
