I have spent the past week trying to convert the Todo-lite sample over to 
use within my own application.  The Todo sample works on my simulator but 
any attempts to call the database directly using my own code are failing. 
 I feel like I must be missing something obvious here.

Reading through the documentation and code, the critical method to 
implement is getURL.  The return value from getURL is that the location of 
the couchbase lite database is at "http://lite.couchbase./";.  Using the 
documentation for the REST API for couchbase lite 
(http://developer.couchbase.com/mobile/develop/references/couchbase-lite/rest-api/database/index.html)
 
I should be able to simply call GET on the database and it will return 
basic information to confirm I am connecting.

So, I created my own code to talk to the database directly on the device:

            logMessage("Checking database connection");
            var url = "http://lite.couchbase./todo";;

            var xmlHttp = new XMLHttpRequest();
            xmlHttp.open('GET', url, false);
            xmlHttp.send();
            logMessage(" XML status: " + xmlHttp.status);
            logMessage(" XML status: " + xmlHttp.statusText);

For some reason, the code above returns a 404 error with no status text 
every single time.  I have tried using the coax class to create the URLs 
instead (e.g. var db = coax([url, appDbName]);) but continue to get the 
same response.  I would love some help in understanding what I am missing 
here!

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/d3375180-973f-4c1e-8598-c5b6a92e73e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to