From 93c2030d0610c3a6b9d107d677b4dd31a4dc017a Mon Sep 17 00:00:00 2001 From: Marcel Jacek Date: Mon, 28 Apr 2025 13:29:57 +0200 Subject: [PATCH] fix: execute of methods with an optional payload fails, if no payload was added --- templates/go/client.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/go/client.mustache b/templates/go/client.mustache index 808a1d4..f70e117 100644 --- a/templates/go/client.mustache +++ b/templates/go/client.mustache @@ -307,7 +307,7 @@ func (c *APIClient) prepareRequest( var body *bytes.Buffer // Detect postBody type and post. - if postBody != nil { + if !IsNil(postBody) { contentType := headerParams["Content-Type"] if contentType == "" { contentType = detectContentType(postBody)