Skip to content

Commit 740ae3c

Browse files
author
Veronika Matyus
committed
Add streaming notes to update example file
1 parent 3de1287 commit 740ae3c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

modules/examples/src/main/java/UpdateDoc.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ public static void main(String[] args) {
3939
.execute()
4040
.getResult();
4141

42+
// Note: for byte response (Output Stream) use:
43+
//InputStream resultAsInputStream =
44+
// client.getDocumentAsStream(documentInfoOptions)
45+
// .execute()
46+
// .getResult();
47+
4248
// Add Bob Smith's address to the document
4349
document.put("address", "19 Front Street, Darlington, DL5 1TY");
4450

@@ -51,6 +57,15 @@ public static void main(String[] args) {
5157
.db(exampleDbName)
5258
.document(document)
5359
.build();
60+
61+
//Note: for byte request (Input Stream) use:
62+
//PostDocumentOptions updateDocumentOptions =
63+
// new PostDocumentOptions.Builder()
64+
// .db(exampleDbName)
65+
// .contentType("application/json")
66+
// .body(inputStream)
67+
// .build();
68+
5469
DocumentResult updateDocumentResponse = client
5570
.postDocument(updateDocumentOptions)
5671
.execute()

0 commit comments

Comments
 (0)