Skip to content

Commit 93c2030

Browse files
committed
fix: execute of methods with an optional payload fails, if no payload was added
1 parent 766a281 commit 93c2030

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/go/client.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func (c *APIClient) prepareRequest(
307307
var body *bytes.Buffer
308308
309309
// Detect postBody type and post.
310-
if postBody != nil {
310+
if !IsNil(postBody) {
311311
contentType := headerParams["Content-Type"]
312312
if contentType == "" {
313313
contentType = detectContentType(postBody)

0 commit comments

Comments
 (0)