Answer the question
In order to leave comments, you need to log in
How to update data in Couch DB from JS?
Good day, I use Couch DB for data storage.
I send a get request from Angular, get JSON and work with it, everything is fine here, but when it becomes necessary to save the data back, there is a problem. I can’t figure it out, I wrote the entire manual for the Curl utility.
So the question is, how should a request be formed in AngularJS (Well, or pure JS) to change or add a document to CouchDB.
This option is offered by the Curl utility.
curl -X PUT http://127.0.0.1:5984/database_name/document_id/ -d '{ "field" : "value", "_rev" : "revision id" }'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question