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 21
21
doc_id = example_doc_id
22
22
).get_result ()
23
23
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
+
24
30
# Add Bob Smith's address to the document
25
31
document ["address" ] = "19 Front Street, Darlington, DL5 1TY"
26
32
34
40
document = document
35
41
).get_result ()
36
42
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
+
37
49
# Keep track with the revision number of the document object:
38
50
document ["_rev" ] = update_document_response ["rev" ]
39
51
print (f'You have updated the document:\n ' +
43
55
if ae .code == 404 :
44
56
print ('Cannot delete document because either ' +
45
57
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