Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: respect common env variables #347

Merged
merged 9 commits into from
Dec 19, 2024
Merged
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to the Zowe Client Python SDK will be documented in this fil
### Enhancements

- Turning off logger at the class-constructor level [#316](https://github.com/zowe/zowe-client-python-sdk/issues/316)
- Added support for commonly used environmental variables, like `REQUESTS_CA_BUNDLE` and `CURL_CA_BUNDLE`. [#346](https://github.com/zowe/zowe-client-python-sdk/issues/346)

### Bug Fixes

Expand Down
6 changes: 2 additions & 4 deletions src/core/zowe/core_for_zowe_sdk/request_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,8 @@ def __send_request(self, stream: bool = False):
stream : bool
Flag indicates whether it is a streaming requests.
"""
session = self.session
request_object = requests.Request(method=self.__method, **self.__request_arguments)
prepared = session.prepare_request(request_object)
self.__response = session.send(prepared, stream=stream, **self.session_arguments)
self.__response = self.session.request(
method=self.__method, stream=stream, **self.session_arguments, **self.__request_arguments)

def __del__(self):
"""Clean up the REST session object once it is no longer needed anymore."""
Expand Down
Loading