From 69274e52215c6d26b9ff7bd2edc59c15ea58d73b Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Tue, 10 Sep 2024 14:37:32 +0000 Subject: [PATCH] fix(requestconfig): copy over more fields when cloning --- internal/requestconfig/requestconfig.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/internal/requestconfig/requestconfig.go b/internal/requestconfig/requestconfig.go index 3b5a1147..ae8e1e96 100644 --- a/internal/requestconfig/requestconfig.go +++ b/internal/requestconfig/requestconfig.go @@ -467,10 +467,16 @@ 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, + APIKey: cfg.APIKey, + Organization: cfg.Organization, + Project: cfg.Project, } return new