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: http://wiki.apache.org/couchdb/Document_Update_Handlers?action=diff&rev1=21&rev2=22 Comment: 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 [[https://issues.apache.org/jira/browse/COUCHDB-648|this issue]] in JIRA. - == Usage == To invoke a handler, use one of:
