Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 86247 invoked from network); 23 Apr 2009 16:37:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Apr 2009 16:37:09 -0000 Received: (qmail 40364 invoked by uid 500); 23 Apr 2009 16:35:58 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 40078 invoked by uid 500); 23 Apr 2009 16:35:57 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 39887 invoked by uid 99); 23 Apr 2009 16:34:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2009 16:34:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robert.newson@gmail.com designates 209.85.218.170 as permitted sender) Received: from [209.85.218.170] (HELO mail-bw0-f170.google.com) (209.85.218.170) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2009 16:33:57 +0000 Received: by bwz18 with SMTP id 18so705309bwz.11 for ; Thu, 23 Apr 2009 09:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=QuUCTXd5bcBPBdwplB3yJsunwjeAKvDdwwcN9FxCsxI=; b=cFcPunxo+ow5cakbUkEdsprKBGObrUzt1q8zkyFAG+LuWW8fy0mwQqA53SqV+u8vxH UcWcwIGwSQjidZeyxzBjSzh7+mfo21xjxm02P6k8Fc/y1V9wqCO58nBHF7FaARYwHBqr pdAHfudkMVWDZnpfPGeU09b4ouSmtg2+hXtDY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=qiRt0KE7xN+d5IRBQ6s4Auc3dvepSGsS9/YmQgVVeMlZjXYAAtFwJh0OLIj6v7vuQ7 tFZKy3n4ADiHSP81mMiwlPpFa1UAT4vVTvjUIuFnfJOCptnwLzBNCQvWS7Jd1lo6f0uR LZn6nPc9aPsiFUIMiAtZcwdtAcS+GuO8BXNjI= MIME-Version: 1.0 Received: by 10.239.148.206 with SMTP id g14mr70874hbb.54.1240504413626; Thu, 23 Apr 2009 09:33:33 -0700 (PDT) In-Reply-To: <1d3db2990904230838r34a4c060t5ae305e67145a285@mail.gmail.com> References: <1d3db2990904230838r34a4c060t5ae305e67145a285@mail.gmail.com> Date: Thu, 23 Apr 2009 17:33:33 +0100 Message-ID: <46aeb24f0904230933u1a9bad32r9dfdb073c768a11a@mail.gmail.com> Subject: Re: how to do http request within server-side _show or _view functions? From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I was just reading this (at http://wiki.apache.org/couchdb/Formatting_with_Show_and_List); "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 >