I am trying to create a simple AJAX request (via jQuery) at http: // yourusername .couchone.com / (almost the same as if I installed couchdb on localhost)
If I go to http://**yourusername**.couchone.com/through the browser, I get:
{"couchdb":"Welcome","version":"1.0.1"}So, this looks like serialized JSON.
So, I wrote the JS code:
$(function() {
$.getJSON('http://www.********.couchone.com/', function(data) {
console.log(data.couchdb);
console.log(data.version);
});
});
But the code does not work. The FireBug console shows that the GET request has no response (the entire line is in red). All I see is the request header and response header, but NO DATA (as an answer)
Request Header:
Host : www.*******.couchone.com
User-Agent : Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 FirePHP/0.4
Accept : application/json, text/javascript, */*
Accept-Language : de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding : gzip,deflate
Accept-Charset : ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive : 115
Connection : keep-alive
Origin : null
Answer Header:
Server : CouchDB/1.0.1 (Erlang OTP/R13B)
Date : Sun, 26 Sep 2010 12:45:47 GMT
Content-Type : application/json
Content-Length : 40
Cache-Control : must-revalidate
Ideas? Suggestions?
PS sorry for bad english