      :value (.getValue cookie)
      :version (.getVersion cookie)})])
 
-(defn ^org.apache.http.impl.cookie.BasicClientCookie2
+(defn ^BasicClientCookie2
   to-basic-client-cookie
   "Converts a cookie seq into a BasicClientCookie2."
   [[cookie-name cookie-content]]

(ns clj-http.cookies
  (:require [clj-http.util :refer [opt]]
            [clojure.string :refer [blank? join lower-case]])
  (:import (org.apache.http.client.params ClientPNames CookiePolicy)
           (org.apache.http.cookie ClientCookie CookieOrigin)
           (org.apache.http.params BasicHttpParams)
           (org.apache.http.impl.cookie BasicClientCookie2)
           (org.apache.http.impl.cookie BrowserCompatSpecFactory)
           (org.apache.http.message BasicHeader)
           org.apache.http.client.CookieStore))

(defn cookie-spec ^org.apache.http.cookie.CookieSpec []
  (.newInstance
   (BrowserCompatSpecFactory.)
   (doto (BasicHttpParams.)
     (.setParameter ClientPNames/COOKIE_POLICY
                    CookiePolicy/BROWSER_COMPATIBILITY))))

(defn compact-map
  "Removes all map entries where value is nil."

  "Returns a new, empty instance of the default implementation of the
  org.apache.http.client.CookieStore interface."
  []
  (BasicCookieStore.))

(defn get-cookies
  "Given a cookie-store, return a map of cookie name to a map of cookie values."
