From 2b9020d4acec3053cc8da02068eeaae7ad2daa9b Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Mon, 18 Mar 2019 20:37:19 -0700 Subject: [PATCH] Only force API version if it was not set by the request --- stripe.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stripe.go b/stripe.go index f0ec755d00..a2379f3b47 100644 --- a/stripe.go +++ b/stripe.go @@ -295,7 +295,8 @@ func (s *BackendImplementation) NewRequest(method, path, key, contentType string for k, v := range params.Headers { for _, line := range v { - req.Header.Add(k, line) + // Use Set to override the default value possibly set before + req.Header.Set(k, line) } } }