servercow: fix regression (#1964)
This commit is contained in:
parent
0b5727002c
commit
e57bf3bbcf
1 changed files with 2 additions and 3 deletions
|
@ -149,9 +149,8 @@ func newJSONRequest(ctx context.Context, method string, endpoint *url.URL, paylo
|
|||
|
||||
req.Header.Set("Accept", "application/json")
|
||||
|
||||
if payload != nil {
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
}
|
||||
// Content-Type should be added even if there is no request body.
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
|
||||
return req, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue