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.
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