Hey,
I’ve been implementing some Sync gateway API calls as part of my login flow (unrelated to _user) and I’m pretty sure there’s an error in the API docs.
At the top of this page, it says that the PUT/{db}/ endpoint will create a document. I was trying to use that endpoint to create some docs and have them assigned auto-generated IDs and was, at first, getting success, but with nothing actually created and no response JSON, and then a “database already exists error” (I’m honestly not sure what changed, I tried reproducing the first case and couldn’t). I was sending the request with the doc’s JSON as the request body .
Anyway, I’m now using CBLite to generate the doc IDs and then posting them to the server at the PUT /{db}/{docid} endpoint, and that’s working fine, but I’d like to know if I’m doing something wrong with the first endpoint, or if it’s an error in the docs (it also says that there is supposed to be an empty request body, which means there’s definitely and inconsistency somewhere).
Thanks