Skip to content

Commit

Permalink
Merge branch 'main' into feature-datasource-robot-and-project-members
Browse files Browse the repository at this point in the history
  • Loading branch information
flbla authored Nov 18, 2024
2 parents 9914bb5 + 5568402 commit 73be2e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 73be2e7

Please sign in to comment.