load a couchdb url with callback

30 views
Skip to first unread message

bryan rasmussen

unread,
Mar 26, 2013, 3:07:37 PM3/26/13
to js...@googlegroups.com
Hi,

I was just wondering if I could do the following:
load("http://localhost:5984/local_proto/_all_docs?include_docs=true&callback=localcommands");
at the beginning of my script. It looks like the answer is no, so I
guess in that case I should the normal http request object to get it,
but if not it might be nice.

thanks,
Bryan Rasmussen

Shanti Rao

unread,
Mar 26, 2013, 3:59:49 PM3/26/13
to js...@googlegroups.com
Why yes. What you want is

run(new Stream('http://localhost:8830/hello.js'))

Use run() instead of load(), because load() tries to be safe and will only execute code that it finds in certain places.

Shanti
Reply all
Reply to author
Forward
0 new messages