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

Injection for requests.Session #148

Conversation

andrewschenck
Copy link

This commit enables the optional injection of the requests.Session object wrapped by RestSession. Operations teams have use cases for modifying the underlying Session behavior, chief of which is to tweak the HTTP retry policy. Currently, we're monkey-patching our own Session object into the RestSession instance; with this PR, we (and other teams) would be able to perform the same thing without violating software contracts.

Author: Andrew Schenck aschenck@cisco.com

This commit enables the optional injection of the requests.Session
object wrapped by RestSession. Operations teams have use cases for
modifying the underlying Session behavior, chief of which is to
tweak the HTTP retry policy. Currently, we're monkey-patching
our own Session object into the RestSession instance; with this PR,
we (and other teams) would be able to perform the same thing
without violating software contracts.I can share code examples of
how and why we need to do this.

Author: Andrew Schenck <aschenck@cisco.com>
@andrewschenck
Copy link
Author

See: #149

@andrewschenck
Copy link
Author

#149

@bvargasre bvargasre merged commit a83191f into cisco-en-programmability:develop Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants