File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 2121 doc_id = example_doc_id
2222 ).get_result ()
2323
24+ # Note: for response byte stream use:
25+ # document_as_byte_stream = client.get_document_as_stream(
26+ # db=example_db_name,
27+ # doc_id=example_doc_id
28+ # ).get_result()
29+
2430 # Add Bob Smith's address to the document
2531 document ["address" ] = "19 Front Street, Darlington, DL5 1TY"
2632
3440 document = document
3541 ).get_result ()
3642
43+ # Note: for request byte stream use:
44+ # update_document_response = client.post_document(
45+ # db=example_db_name,
46+ # document=document_as_byte_stream
47+ # ).get_result()
48+
3749 # Keep track with the revision number of the document object:
3850 document ["_rev" ] = update_document_response ["rev" ]
3951 print (f'You have updated the document:\n ' +
4355 if ae .code == 404 :
4456 print ('Cannot delete document because either ' +
4557 f'"{ example_db_name } " database or "{ example_doc_id } " ' +
46- 'document was not found.' )
58+ 'document was not found.' )
You can’t perform that action at this time.
0 commit comments