Skip to content

Commit e57bf3b

Browse files
authored
servercow: fix regression (#1964)
1 parent 0b57270 commit e57bf3b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

providers/dns/servercow/internal/client.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,8 @@ func newJSONRequest(ctx context.Context, method string, endpoint *url.URL, paylo
149149

150150
req.Header.Set("Accept", "application/json")
151151

152-
if payload != nil {
153-
req.Header.Set("Content-Type", "application/json")
154-
}
152+
// Content-Type should be added even if there is no request body.
153+
req.Header.Set("Content-Type", "application/json")
155154

156155
return req, nil
157156
}

0 commit comments

Comments
 (0)