I can't access my CouchDB server (CouchDBX) using a jQuery AJAX call.
I am able to access my demo database at localhost:5984/helloworld/_all_docs
through browsers (tested with FireFox, Chrome and Safari). But when I do a simple AJAX call using jQuery I get no data returned.
The requests completes with code 200.
Here's what my AJAX call looks like:
$(function ()
{
$.ajax(
{
cache: false,
dataType: "json",
error: function (xmlHttpRequest, textStatus, errorThrown)
{
console.log("error", xmlHttpRequest, textStatus, errorThrown);
},
global: false,
success: function (data, textStatus, xmlHttpRequest)
{
console.log("success", data, textStatus, xmlHttpRequest);
},
timeout: 3000,
url: "http://localhost:5984/helloworld/_all_docs"
});
});
What am I doing wrong?
Update
Screenshots of FireBug console: