diff --git a/remote.go b/remote.go index 2c2db80..2688062 100644 --- a/remote.go +++ b/remote.go @@ -67,6 +67,9 @@ func newRequest(method string, url string, data []byte) (*http.Request, error) { if err != nil { return nil, err } + if data != nil { + request.Header.Add("Content-Type", jsonContentType) + } request.Header.Add("Accept", jsonContentType) return request, nil