anchor.diff:    (:reply ((db =database=) &key (uri "") (method :get) content
              (external-format-out *drakma-default-external-format*)
              parameters additional-headers)
  -    (multiple-value-bind (response status-code)
  -        (couch-request (format nil "~A/~A" (db-namestring db) uri) :method method :content content
  -                       :external-format-out external-format-out
  -                       :parameters parameters
  -                       :additional-headers additional-headers)
  -      (values response status-code))))
  +    (couch-request (server db) :method method :content content
  +                   :uri (strcat (name db) "/" uri)
  +                   :external-format-out external-format-out
  +                   :parameters parameters
  +                   :additional-headers additional-headers)))
   
   (defmacro handle-request (result-var request &body expected-responses)
     (let ((status-code (gensym "STATUS-CODE-")))
  
positive.code:   (couch-request server :uri "_config"))
  
  (defun replicate (server source target)
    (couch-request server :uri (format nil "_replicate?source=~A&target=~A" source target) :method :post))
  
  (defun stats (server)
    (couch-request server :uri "_stats"))
  
negative.code:       (:internal-server-error (error "Illegal database name: ~A" (name db)))
        (:not-found (error 'db-not-found :uri (db-namestring db))))))
  
  (defun connect-to-db (name &key (prototype =database=) (server =server=))
    "Confirms that a particular CouchDB database exists. If so, returns a new database object
  that can be used to perform operations on it."
    (let ((db (create prototype 'server server 'name name)))
      (when (db-info db)
        db)))
  
  (defun create-db (name &key (prototype =database=) (server =server=))
    "Creates a new CouchDB database. Returns a database object that can be used to operate on it."
    (let ((db (create prototype 'server server 'name name)))
      (handle-request response (db-request db :method :put)
        (:created db)
        (:internal-server-error (error "Illegal database name: ~A" name))
  