-
Notifications
You must be signed in to change notification settings - Fork 656
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
BuildableClient use transport http.RoundTripper instead of transport *http.Transport #2405
Comments
There are a few issues with your
Beyond that I'm not sure how implementing the requested change would solve the problem here. Let's address the above issues in advance of any discussion. |
Thank you for your help.
Although creating a custom client in this way can enable recording of request data during requests, I would like to use the default client with options http.RoundTripper. *http. Transport is an implementation of http. RoundTripper |
I agree in principle that Using an instance of the e.g. type roundTripper struct { /* ... */ } // your implementation
func (*roundTripper) RoundTrip(...) (...) { /* ... */ }
svc := s3.NewFromConfig(cfg, func (o *s3.Options) {
o.HTTPClient = &http.Client{
Transport: &roundTripper{ /* ... */ },
}
}) |
|
Describe the feature
github.com/aws/[email protected]/aws/transport/http
use transport http.RoundTripper instead of transport *http.Transport can better support custom configuration on the client
Use Case
I would like to us tracking
eg.
Proposed Solution
I tried using a custom client, but it may cause errors 'net/http: http: ContentLength=222 with Body length 0' when rewriting httpclient due to some middleware.But the official client doesn't have this problem
Other Information
No response
Acknowledgements
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2 v1.22.2
Go version used
1.21
The text was updated successfully, but these errors were encountered: