On 13 November 2013 13:57, Dave Cottlehuber <[email protected]> wrote:
> 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 > 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
