couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andyw...@apache.org
Subject git commit: updated refs/heads/1924-add-an-example-for-updating-a-document-with-PUT to 50e1fae
Date Sun, 10 Nov 2013 13:10:39 GMT
Updated Branches:
  refs/heads/1924-add-an-example-for-updating-a-document-with-PUT 3b6301fe3 -> 50e1faed5


Instead of inserting the request / response example for updating
a document with put in the section PUT /{db}/{docid} add a note
with a link to the section "Updating an existing Document"


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/50e1faed
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/50e1faed
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/50e1faed

Branch: refs/heads/1924-add-an-example-for-updating-a-document-with-PUT
Commit: 50e1faed5dad2797883c6722b8d9ec3e61fae3cf
Parents: 3b6301f
Author: Andy Wenk <andywenk@apache.org>
Authored: Sun Nov 10 14:08:50 2013 +0100
Committer: Andy Wenk <andywenk@apache.org>
Committed: Sun Nov 10 14:08:50 2013 +0100

----------------------------------------------------------------------
 share/doc/src/api/document/common.rst | 65 ++----------------------------
 1 file changed, 3 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/50e1faed/share/doc/src/api/document/common.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/document/common.rst b/share/doc/src/api/document/common.rst
index 5734f07..7423227 100644
--- a/share/doc/src/api/document/common.rst
+++ b/share/doc/src/api/document/common.rst
@@ -235,68 +235,8 @@
         "rev": "1-917fa2381192822767f010b95b45325b"
     }
 
-  **Request (update existing document)**:
-
-  .. code-block:: http
-
-    PUT /recipes/SpaghettiWithMeatballs?rev=1-917fa2381192822767f010b95b45325b HTTP/1.1
-    Accept: application/json
-    Content-Length: 196
-    Content-Type: application/json
-    Host: localhost:5984
-
-    {
-        "description": "An Italian-American dish that usually consists of spaghetti, tomato
sauce and meatballs.",
-        "ingredients": [
-            "spaghetti",
-            "tomato sauce",
-            "meatballs",
-            "mozarella"
-        ],
-        "name": "Spaghetti with meatballs"
-    }
-
-  Alternatively, instead of the ``rev`` query parameter you may use the
-  :header:`If-Match` header:
-
-  .. code-block:: http
-
-    PUT /recipes/SpaghettiWithMeatballs HTTP/1.1
-    Accept: application/json
-    Content-Length: 196
-    Content-Type: application/json
-    If-Match: 1-917fa2381192822767f010b95b45325b
-    Host: localhost:5984
-
-    {
-        "description": "An Italian-American dish that usually consists of spaghetti, tomato
sauce and meatballs.",
-        "ingredients": [
-            "spaghetti",
-            "tomato sauce",
-            "meatballs",
-            "mozarella"
-        ],
-        "name": "Spaghetti with meatballs"
-    }
-
-  **Response (update existing document)**:
-
-  .. code-block:: http
-
-    HTTP/1.1 201 Created
-    Cache-Control: must-revalidate
-    Content-Length: 85
-    Content-Type: application/json
-    Date: Wed, 14 Aug 2013 20:34:23 GMT
-    ETag: 2-faf1e73a94ff04ebede600f173ca0412
-    Location: http://localhost:5984/recipes/SpaghettiWithMeatballs
-    Server: CouchDB (Erlang/OTP)
-
-    {
-        "id": "SpaghettiWithMeatballs",
-        "ok": true,
-        "rev": "2-faf1e73a94ff04ebede600f173ca0412"
-    }
+  .. note::
+    For updating an existing document please see :ref:`Updating an Existing Document` below.
 
 .. http:delete:: /{db}/{docid}
 
@@ -1095,6 +1035,7 @@ with :get:`/{db}/{docid}` request:
       "_rev": "2-056f5f44046ecafc08a2bc2b9c229e20"
   }
 
+.. _Updating an Existing Document:
 
 Updating an Existing Document
 -----------------------------


Mime
View raw message