From 755286e7f5275ddd7ab4b79f895fc551b21911fd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 12:37:39 +0000 Subject: [PATCH] feat: OpenAPI spec update via Stainless API (#1545) --- internal/requestconfig/requestconfig.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/requestconfig/requestconfig.go b/internal/requestconfig/requestconfig.go index 36ea1650ff8..7f5fc8730d1 100644 --- a/internal/requestconfig/requestconfig.go +++ b/internal/requestconfig/requestconfig.go @@ -92,8 +92,11 @@ func NewRequestConfig(ctx context.Context, method string, u string, body interfa hasSerializationFunc = true } if body, ok := body.(apiquery.Queryer); ok { - u = u + "?" + body.URLQuery().Encode() hasSerializationFunc = true + params := body.URLQuery().Encode() + if params != "" { + u = u + "?" + params + } } // Fallback to json serialization if none of the serialization functions that we expect