Hello, is there any way to use XMLHttpRequest with CouchDB?

On Mon, Jan 20, 2014 at 12:29 PM, Hank Knight <[email protected]> wrote:
> I discovered that new functions can be made available to all show and
> list functions by modifying:
> /share/couchdb/server/main.js
>
> I have attached an example.  To test it, replace your version of
> "main.js" with the one I attached.
>
> Then create a design document like the one I attached.
>
> Test it like this:
> http://localhost/db/_design/showtell/_show/test
>
> This causes the custom function in main.js to be executed and it
> returns a result.
>
> I want to use this method to retrieve data, like this:
>
> function getPage(url) {
>  var req = new XMLHttpRequest();
>  req.open("GET", url, false);
>  req.send(null);
>  return(req.responseText);
> }
>
> Everything works until I use XMLHttpRequest.  Then I get an error:
> XMLHttpRequest is not defined
>
> How can I gain access to XMLHttpRequest from main.js?

Reply via email to