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:    (port 5984)))
  
  (defun server->url (server)
    (format nil "http://~A:~A/" (server-host server) (server-port server)))
  
  (defun couch-request (server &key (uri "") (method :get) content parameters additional-headers
                        (external-format-out *drakma-default-external-format*))
    (multiple-value-bind (response status-code)
        (http-request (strcat (server->url server) uri)
                      :method method :content content
                      :external-format-out external-format-out
                      :content-type "application/json"
                      :parameters parameters
                      :additional-headers additional-headers)
      (values response (or (cdr (assoc status-code *status-codes* :test #'=))
                           ;; The code should never get here once we know all the
                           ;; status codes CouchDB might return.
                           (error "Unknown status code: ~A. HTTP Response: ~A"
                                  status-code response)))))
  
  (defun all-dbs (server)
    (couch-request server :uri "_all_dbs"))
  
negative.code:                     :external-format-out +utf-8+
                      :content doc)
        ((:created :accepted) response)
        (:conflict (error 'document-conflict :doc doc)))))
  
  (defmessage delete-document (db id revision)
    (:documentation "Deletes an existing document.")
  