couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Wenk <a...@nms.de>
Subject Re: HTTP request with CouchDB
Date Wed, 13 Nov 2013 13:16:15 GMT
On 13 November 2013 13:57, Dave Cottlehuber <dch@jsonified.com> wrote:

> On 13. November 2013 at 13:49:12, Hank Knight (hknight555@gmail.com)
> wrote:
> >
> > Is it possible to send an HTTP request and receive a result with
> > CouchDB?
>
> Inside view/show/list/filters , no. They’re sandboxed to prevent this.
>
> > I would like to do something like this:
> >
> >
> > function(doc, req) {
> > var http = new XMLHttpRequest();
> > http.open( "GET", "http://abomination-deleted.xml",
> > false );
> > http.send( null );
> > emit("xyz",http.responseText);
> > }
>
> The reason is that each doc should be idempotent; if you can mix into your
> view external results then CouchDB can’t guarantee that fun(x) always
> produces the same x’ as result.
>
> A+
> Dave
>

I understood the question in a more basic way. Means if it's possible to
request CouchDB form a JavaScript file like it is done in Futon ...  sry if
I pointed to the wrong path ...

Cheers

Andy

-- 
Andy Wenk
Hamburg - Germany
RockIt!

http://www.couchdb-buch.de
http://www.pg-praxisbuch.de

GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message