@@ -525,13 +525,30 @@ For sample code on handling errors, see
525
525
### Raw IO
526
526
527
527
For endpoints that read or write document content it is possible to bypass
528
- usage of the built-in models and send or receive a bytes response.
529
- For examples of using byte streams, see the API reference documentation
530
- ("Example request as a stream" section ).
528
+ usage of the built-in models with byte streams.
529
+ Some endpoints send byte request (input stream),
530
+ while others receives byte response (output stream ).
531
531
532
- - [ Bulk modify multiple documents in a database] ( https://cloud.ibm.com/apidocs/cloudant?code=python#postbulkdocs )
533
- - [ Query a list of all documents in a database] ( https://cloud.ibm.com/apidocs/cloudant?code=python#postalldocs )
534
- - [ Query the database document changes feed] ( https://cloud.ibm.com/apidocs/cloudant?code=python#postchanges )
532
+ Input stream can be supplied for ` BinaryIO ` typed
533
+ property.
534
+ This value will be attached to the existing model based request params.
535
+
536
+ Output stream can be gained from functions with suffix ` AsStream ` .
537
+ The returned byte stream will allow to consume the response body
538
+ without triggering the usual JSON unmarshalling that is typically performed by the SDK.
539
+
540
+ See a usage example for both cases under the note-comments of
541
+ [ update document] ( #3-update-your-previously-created-document )
542
+
543
+ For further examples of using byte streams, see the API reference documentation
544
+ ("Example request as a stream" collapsed example).
545
+
546
+ See an example about byte request (input stream):
547
+ - [ Bulk modify multiple documents in a database] ( https://cloud.ibm.com/apidocs/cloudant?code=java#postbulkdocs )
548
+
549
+ See examples about byte response (output stream):
550
+ - [ Query a list of all documents in a database] ( https://cloud.ibm.com/apidocs/cloudant?code=java#postalldocs )
551
+ - [ Query the database document changes feed] ( https://cloud.ibm.com/apidocs/cloudant?code=java#postchanges )
535
552
536
553
### Further resources
537
554
0 commit comments