-
Notifications
You must be signed in to change notification settings - Fork 149
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
Add a new ConfigSetter that accepts a callback function that will intercept HTTP calls #371
Conversation
Cool PR @dnelson27 , is it still WIP? |
I just need to sign the CLA! Is that something I need to input somewhere or is checking the box my "Signature"? I figure the code is sort of self-documenting, but I can add some docstrings if its unclear. |
@dnelson27 just follow the directions here |
Ah, I completely missed the section about the email on my first pass-over. Thanks! |
@dnelson27 if you could get that CLA in today that would be great, I'd like to release this PR and #372 / #369 as a single release. |
CLA is submitted! |
This adds a new
ConfigSetter
functionWithHttpInterceptorAndHttpClientPtr
that allows clients to pass in a callback method that will be called for each HTTP request.My organization currently uses
WithHttpClientPtr
to achieve this, but it would be great if the SDK supported it by default!One significant use case is allowing clients to easily keep track of their API calls with their own observability code.
Example usage
Summary
Fixes #
Type of PR
Test Information
Go Version:
go1.18.4 linux/amd64
Os Version:
Linux 5.10.16.3-microsoft-standard-WSL2
OpenAPI Spec Version:
Signoff
make fmt
on my code