Skip to content

Add ability to override call config in interceptor #669

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

Merged
merged 2 commits into from
Apr 25, 2025

Conversation

mtdowling
Copy link
Member

Interceptors now have a new hook, modifyBeforeCall that accepts the ApiOperation being called, input of the call, and ClientConfig. It is expected to return the same ClientConfig or an updated ClientConfig using ClientConfig#withRequestOverride.

This allows for much more dynamic calls with clients, like changing the protocol per/call, applying plugins per/call, and more.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Interceptors now have a new hook, modifyBeforeCall that accepts the
ApiOperation being called, input of the call, and ClientConfig. It
is expected to return the same ClientConfig or an updated ClientConfig
using ClientConfig#withRequestOverride.

This allows for much more dynamic calls with clients, like changing
the protocol per/call, applying plugins per/call, and more.
@mtdowling mtdowling force-pushed the add-request-override-to-interceptors branch from dae6e73 to 96e0dcf Compare April 24, 2025 15:27
@mtdowling mtdowling requested a review from rhernandez35 April 25, 2025 19:41
@mtdowling mtdowling merged commit be5f1f5 into main Apr 25, 2025
2 checks passed
@mtdowling mtdowling deleted the add-request-override-to-interceptors branch April 25, 2025 21:15
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