The JS API is ultimately sending HTTP requests to Couchbase Lite’s REST API, which is what we support. If you know the exact HTTP request that’s being sent and have an issue with it, we can answer that.
(We’d like to offer a supported JS API, but we just haven’t had the resources to do so yet.)
I don’t know why an update would return a 406 error; normally that error only happens with a GET request, if the requested response type isn’t available. I think this problem has something to do with the Ionic wrapper code you’re using.
Whenever you update a document, you have to pass the revision ID that the document had when you retrieved it:
GET (or PUT) document
Get the revision ID from the response
Modify the document properties
PUT the change, including the revision ID from step 2.
i can’t update localy and in the server.
it is not pushing update to the server. Using sync gateway, CreateDocument and Delete function are working properly in my aplication and the Couchbase server sync is also working correctly through syncgateway. but while using update i see the status code 200 in the sync but any change has done localy and in the couchbase server.