anchor.diff:      (string maybe-json)
       (list (document-to-json maybe-json))))
   
  -(defmessage couch-request (server &key)
  +(defmessage couch-request (server uri &key)
     (:documentation "Sends an HTTP request to the CouchDB server represented by SERVER. Most
   of the keyword arguments for drakma:http-request are available as kwargs for this message.")
  -  (:reply ((server =server=) &rest all-keys &key (uri ""))
  +  (:reply ((server =server=) uri &rest all-keys)
       (multiple-value-bind (response status-code)
           (apply #'http-request (strcat (server->url server) uri)
                  :content-type "application/json"
  
positive.code: (defmessage db-request (db &key)
    (:documentation "Sends a CouchDB request to DB.")
    (:reply ((db =database=) &rest all-keys &key (uri ""))
      (apply #'couch-request (server db) :uri (strcat (name db) "/" uri) all-keys)))
  
  (defmacro handle-request ((result-var request) &body expected-responses)
    "Provides a nice interface to the relatively manual, low-level status-code checking that
  
negative.code:                            ;; status codes CouchDB might return.
                             (error "Unknown status code: ~A. HTTP Response: ~A"
                                    status-code response)))))
    (:reply :around ((server =json-server=) uri &rest all-keys &key (content nil contentp))
      "This special :around reply wraps the standard =server= reply and encodes/decodes JSON
  where appropriate, which makes for a nicer Lisp-side API."
      (multiple-value-bind (response status-code)
          (apply #'call-next-reply server uri :content (when contentp (ensure-json content)) all-keys)
        (values (json-to-document response) status-code))))
  
  (defun all-dbs (server)
    "Requests a list of all existing databases from SERVER."
    (couch-request server "_all_dbs"))
  
  (defun config-info (server)
    "Requests the current configuration from SERVER."
    (couch-request server "_config"))
  
  (defun replicate (server source target)
    "Replicates the database in SOURCE to TARGET. SOURCE and TARGET can both be either database names
  