Adds a new response interceptor method that allows the interceptor to return an updated response. This method has a default implementation in the interface to retain backwards compatibility. The existing method has also been made default, and I will likely mark it deprecated at some point in the future. The new method is now called by the dispatcher, which by default will proxy it to the existing method unless overridden in the user's interceptor implementation.
The other approach would be to introduce an entirely new response interceptor interface which would in some ways be a cleaner solution, but was not chosen due to discoverability concerns and loss of parity with other language SDKs.
Motivation and Context
This change is in response to #206 where a customer wants the ability to update the response as part of their response interceptor logic.
Testing
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[x] My code follows the code style of this project
[ ] My change requires a change to the documentation
[ ] I have updated the documentation accordingly
[ ] I have read the README document
[x] I have added tests to cover my changes
[ ] All new and existing tests passed
License
[x] I confirm that this pull request can be released under the Apache 2 license
Description
Adds a new response interceptor method that allows the interceptor to return an updated response. This method has a default implementation in the interface to retain backwards compatibility. The existing method has also been made default, and I will likely mark it deprecated at some point in the future. The new method is now called by the dispatcher, which by default will proxy it to the existing method unless overridden in the user's interceptor implementation.
The other approach would be to introduce an entirely new response interceptor interface which would in some ways be a cleaner solution, but was not chosen due to discoverability concerns and loss of parity with other language SDKs.
Motivation and Context
This change is in response to #206 where a customer wants the ability to update the response as part of their response interceptor logic.
Testing
Types of changes
Checklist
License