I reproduced this and ran into another issue before I got it working. First, the 6-parameter constructor for Session
is what you're after:
public Session(String host, int port, String user, String pass, boolean usesAuth, boolean secure) {
In the example you gave above, this would work:
new Session("stockquotetest.cloudant.com", 443, "user", "pass", true, true);
This is because if you don't set secure
to true, the URL will not be constructed with https.
After that was working, the next error was the Database
class assuming that update_seq
is an int. Cloudant will return a String update_seq
, not an integer. I altered the field, response parsing, and getter in the Database
class from int
to String
to make the code work for me.