couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Couchdb Wiki] Update of "Document_Update_Handlers" by SimonDeBoer
Date Sun, 06 May 2012 19:16:19 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Document_Update_Handlers" page has been changed by SimonDeBoer:

Adding information about the existence of the X-Couch-Update-NewRev response header.

  The server also parses the POST body into a Javascript object called `form` and does the
same with the query string, in `query`.
  == Response ==
+ If the first member of the return array is a document the HTTP response headers include
a "X-Couch-Update-NewRev" with the _rev number from the document after the change/create has
been applied.  This can be used to keep the client's object in sync with that in the database.
  The second member of the return array is the HTTP response. This can be a javascript object
with headers and a body:
  {{{#!highlight javascript
@@ -122, +124 @@

      <p>Update function complete!</p>
  Though you can set the headers, right now the status code for an update function response
is hardcoded to be 200/201 unless an error occurs. See [[|this
issue]] in JIRA.
  == Usage ==
  To invoke a handler, use one of:

View raw message