Advertisement
Polly2

Untitled

Aug 7th, 2015
2,999
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (1) curl -X PUT 194.249.0.123:5984/test_database
  2. {"ok":true}
  3. (2) curl -X GET 194.249.0.123:5984/_uuids
  4. {"uuids":["ac5dc83eae5f8a312c285efbd6005e06"]}
  5. (3) curl -X PUT 194.249.0.123:5984/test_database/person_id -d '{"Name":"Janez", "Surname":"Novak"}'
  6. {"ok":true,"id":"person_id","rev":"1-4f2518bf19c3ec916e09f99dcce71ff1"}
  7. (4) curl -X PUT 194.249.0.123:5984/test_database/person_id -d '{"Name":"Peter", "Surname":"Novak"}'
  8. {"error":"conflict","reason":"Document update conflict."}
  9. (5) curl -X GET 194.249.0.123:5984/test_database/person_id
  10. {"_id":"person_id","_rev":"1-4f2518bf19c3ec916e09f99dcce71ff1","Name":"Janez","Surname":"Novak"}
  11. (6) curl -X PUT 194.249.0.123:5984/test_database/person_id -d
  12. '{"_rev":"1-4f2518bf19c3ec916e09f99dcce71ff1", "Name":"Peter", "Surname":"Novak"}'
  13. {"ok":true,"id":"person_id","rev":"2-8e558a9618023cc18322f3faf81cba3b"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement