couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <>
Subject Re: how to do http request within server-side _show or _view functions?
Date Thu, 23 Apr 2009 17:14:44 GMT
I think the same rule applies, you should use the parameters supplied,
and only those, to implement your validate function.

You have the old document, the new document and the user context
object to play with, it sounds like that's enough for your case


On Thu, Apr 23, 2009 at 5:59 PM, Samuel Wan <> wrote:
> Thanks. What about validate_doc_update? My goal was to check a hashed
> key in the document submitted by a user by comparing the key with a
> stored document when the validate_doc_update is called.
> -Sam
> On Thu, Apr 23, 2009 at 9:33 AM, Robert Newson <> wrote:
>> I was just reading this (at
>> "Show and list functions are side effect free and idempotent. *They
>> can not make additional HTTP requests against CouchDB*. Their purpose
>> is to render JSON documents in other formats."
>> So they can't, and it's intentional.
>> B.
>> On Thu, Apr 23, 2009 at 4:38 PM, Samuel Wan <> wrote:
>>> Is there a way to do an http request within the server-side _show or
>>> _view functions, or is the JS context limited to what's defined by
>>> Spidermonkey and main.js? My understanding is that Spidermonkey
>>> doesn't provide an xmlhttprequest object.
>>> Also, does CouchDB ship with an interactive javascript shell, or do
>>> you have to build and install your own? I found the couchjs
>>> executable, but it only interprets javascript files.
>>> -Sam

View raw message