-
Notifications
You must be signed in to change notification settings - Fork 9
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
httplib2 to requests migration #117
Comments
ghost
pinned this issue
Jan 18, 2022
srv-rr-github-token
pushed a commit
that referenced
this issue
Feb 1, 2022
# [6.0.0](v5.0.7...v6.0.0) (2022-02-01) * feat!: migrate from httplib2 to requests library ([08b895d](08b895d)) ### BREAKING CHANGES * See #117.
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
splunktaucclib
uses thehttplib2
internally to make the API calls. In the next release of splunktaucclib (6.0.0), we will be replacing thehttplib2
library with therequests
library. This issue provides the change details.Difference between
httplib2
andrequests
:(response_headers, content)
and requests returnsresponse
content
is a type of bytes object which needs to be converted into an str object. In requests, we can directly get the str object using theresponse.text
Example:
Using
httplib2
:Using
requests
:Code change require to use the splunktaucclib v6.0.0
Note: If you are using the
splunktaucclib.alert_actions_base.ModularAlertBase
class directly in your code then you need to make the below change in your source code to use the splunktaucclib v6.0.0.build_http_connection
method (of classModularAlertBase
) is removed in the splunktaucclib v6.0.0. We recommend users to directly use therequests.request
function to make the API calls. Doc: https://docs.python-requests.org/en/latest/api/The text was updated successfully, but these errors were encountered: