Getting an empty response when calling CouchDB over ajax
Posted
by swilliams
on Stack Overflow
See other posts from Stack Overflow
or by swilliams
Published on 2010-03-23T21:55:08Z
Indexed on
2010/03/23
23:53 UTC
Read the original article
Hit count: 367
I'm new to CouchDB, so please bear with me.
I have an instance of CouchDB running on a VM. I can access it just fine through the browser via futon or directly at:
http://192.168.62.128:5984/articles/hot_dog
Calling that URL in a browser returns the proper JSON. But, when I try to call that exact same URL via ajax, I get nothing:
var ajaxUrl = 'http://192.168.62.128:5984/articles/hot_dog';
$.getJSON(ajaxUrl, null, function(data) { alert(data); });
Looking at the response header with Firebug shows me that the HTTP response was 200
and the content-length
is the right size. Even the Etag
matches with what is in CouchDB. But the response itself is empty!
The URL is absolutely right; I've triple checked, and copy/pasted it directly (and besides it wouldn't give a 200 response if it weren't). I'm using jQuery 1.4.2, and CouchDB 0.8
What's going on?
© Stack Overflow or respective owner