Skip to content

Commit

Permalink
fix(requestconfig): copy over more fields when cloning (#3059)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Sep 10, 2024
1 parent 75e1c53 commit f545a68
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions internal/requestconfig/requestconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,17 @@ func (cfg *RequestConfig) Clone(ctx context.Context) *RequestConfig {
return nil
}
new := &RequestConfig{
MaxRetries: cfg.MaxRetries,
Context: ctx,
Request: req,
HTTPClient: cfg.HTTPClient,
MaxRetries: cfg.MaxRetries,
RequestTimeout: cfg.RequestTimeout,
Context: ctx,
Request: req,
BaseURL: cfg.BaseURL,
HTTPClient: cfg.HTTPClient,
Middlewares: cfg.Middlewares,
APIToken: cfg.APIToken,
APIKey: cfg.APIKey,
APIEmail: cfg.APIEmail,
UserServiceKey: cfg.UserServiceKey,
}

return new
Expand Down

0 comments on commit f545a68

Please sign in to comment.