From f545a68dc99f9f71624abefdc6b772809387bf15 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:57:23 +0000 Subject: [PATCH] fix(requestconfig): copy over more fields when cloning (#3059) --- internal/requestconfig/requestconfig.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/internal/requestconfig/requestconfig.go b/internal/requestconfig/requestconfig.go index 3e2f220e7f7..037aaecb84d 100644 --- a/internal/requestconfig/requestconfig.go +++ b/internal/requestconfig/requestconfig.go @@ -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