servercow: fix regression (#1964)

This commit is contained in:
Ludovic Fernandez 2023-07-21 16:56:01 +02:00 committed by GitHub
parent 0b5727002c
commit e57bf3bbcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}