You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Daniel Suen <tt...@yahoo.com.INVALID> on 2016/12/08 15:52:08 UTC

update functions in design document - missing X-Couch-Id and X-Couch-Update-NewRev...

I am on CouchDB 2.0 on Linux.
I created a function inside the updates object of my design document. It basically looks similar to the examples given in the API reference.
When I tried to invoke the function, it executes correctly (the target document gets updated), and according the the API reference, I should be expecting "X-Couch-Id" and "X-Couch-Update-NewRev" in the headers. However, I don't see them being returned. I saw "X-Couch-Request-ID" and "X-CouchDB-Body-Time", but not the ones stated in the reference documentation.
Did anyone experience the same thing before?
What should I do to make them appear in the response headers?
The documtation is at 10.5.5. /db/_design/design-doc/_show/show-name — Apache CouchDB 2.0 Documentation.
  
|  
|   |  
10.5.5. /db/_design/design-doc/_show/show-name — Apache CouchDB 2.0 Documentation
   |  |

  |

 

Appreciate your help.
Daniel.

Re: update functions in design document - missing X-Couch-Id and X-Couch-Update-NewRev...

Posted by Daniel Suen <tt...@yahoo.com.INVALID>.
OK, I should send a PUT instead of POST.
Daniel.

      From: Daniel Suen <tt...@yahoo.com.INVALID>
 To: User <us...@couchdb.apache.org> 
 Sent: Thursday, December 8, 2016 10:52 AM
 Subject: update functions in design document - missing X-Couch-Id and X-Couch-Update-NewRev...
   
I am on CouchDB 2.0 on Linux.
I created a function inside the updates object of my design document. It basically looks similar to the examples given in the API reference.
When I tried to invoke the function, it executes correctly (the target document gets updated), and according the the API reference, I should be expecting "X-Couch-Id" and "X-Couch-Update-NewRev" in the headers. However, I don't see them being returned. I saw "X-Couch-Request-ID" and "X-CouchDB-Body-Time", but not the ones stated in the reference documentation.
Did anyone experience the same thing before?
What should I do to make them appear in the response headers?
The documtation is at 10.5.5. /db/_design/design-doc/_show/show-name — Apache CouchDB 2.0 Documentation.
  
|  
|  |  
10.5.5. /db/_design/design-doc/_show/show-name — Apache CouchDB 2.0 Documentation
  |  |

  |

 

Appreciate your help.
Daniel.