From a1770cb71c48a0140551836df2295fd0d711c692 Mon Sep 17 00:00:00 2001 From: Alex Kwiatkowski Date: Fri, 22 Dec 2023 10:45:59 -0800 Subject: [PATCH] return response instead of raw for stream requests - enables use of iterator - https://requests.readthedocs.io/en/latest/user/quickstart.html\#raw-response-content Signed-off-by: Alex Kwiatkowski --- CHANGELOG.md | 1 + src/core/zowe/core_for_zowe_sdk/request_handler.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 541392bf..6360d1d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to the Zowe Client Python SDK will be documented in this fil ### Bug Fixes - Fixed 'create_data_set' to accept "FBA", "FBM", "VBA", "VBM" as valid recfm [#240](https://github.com/zowe/zowe-client-python-sdk/issues/240) +- Return response instead of raw from streamed requests ## `1.0.0-dev12` diff --git a/src/core/zowe/core_for_zowe_sdk/request_handler.py b/src/core/zowe/core_for_zowe_sdk/request_handler.py index adb271e0..062bfd02 100644 --- a/src/core/zowe/core_for_zowe_sdk/request_handler.py +++ b/src/core/zowe/core_for_zowe_sdk/request_handler.py @@ -93,7 +93,7 @@ def perform_streamed_request(self, method, request_arguments, expected_code=[200 self.__validate_method() self.__send_request(stream=True) self.__validate_response() - return self.response.raw + return self.response def __validate_method(self): """Check if the input request method for the request is supported.