From d30c886927a364e4378742b226982950d76bd79b Mon Sep 17 00:00:00 2001 From: flbla Date: Wed, 23 Oct 2024 16:19:05 +0200 Subject: [PATCH] fixes #467 : GET requests blocked by AWS Application Load Balancer --- client/client.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/client.go b/client/client.go index 8666e68..c798fc0 100644 --- a/client/client.go +++ b/client/client.go @@ -40,9 +40,11 @@ func (c *Client) SendRequest(method string, path string, payload interface{}, st client := &http.Client{} b := new(bytes.Buffer) - err = json.NewEncoder(b).Encode(payload) - if err != nil { - return "", "", 0, err + if payload != nil { + err = json.NewEncoder(b).Encode(payload) + if err != nil { + return "", "", 0, err + } } if c.insecure == true {