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: (defparameter +utf-8+ (make-external-format :utf-8 :eol-style :lf))
  
  (defproto =database= ()
    ((server (make-server)) name db-namestring)
    :documentation
    "Base database prototype. These objects represent the information required in order to communicate
  with a particular CouchDB database.")
  (defmessage host (db)
    (:reply ((db =database=))
      (server-host (server db))))
  (defmessage port (db)
    (:reply ((db =database=))
      (server-port (server db))))
  ;; These extra replies handle automatic caching of the db-namestring used by db-request.
  (defreply db-namestring :around ((db =database=))
    (or (call-next-reply)
        (setf (db-namestring db) (db->url db))))
  (defreply (setf server) :after (new-val (db =database=))
    (declare (ignore new-val))
    (setf (db-namestring db) nil))
  
  (defmessage db->url (db)
    (:documentation "Converts the connection information in DB into a URL string.")
    (:reply ((db =database=))
      (strcat (server->url (server db)) (name db))))
  
  ;; TODO - CouchDB places restrictions on what sort of URLs are accepted, such as everything having
  ;;        to be downcase, and only certain characters being accepted. There is also special meaning
  
negative.code:   (couch-request server :uri "_config"))
  
  (defun replicate (server source target)
    (couch-request server :method :post
                   :uri (format nil "_replicate?source=~A&target=~A" source target)))
  
  (defun stats (server)
    (couch-request server :uri "_stats"))
  