On 13. November 2013 at 13:49:12, Hank Knight ([email protected]) 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

Reply via email to