Fix content type for RPC requests

This commit is contained in:
Ivan Danyliuk 2018-06-20 17:30:14 +02:00
parent 87fa0cc5e5
commit 2b630f1de0
No known key found for this signature in database
GPG Key ID: 97ED33CE024E1DBF
1 changed files with 2 additions and 0 deletions

2
rpc.go
View File

@ -79,7 +79,9 @@ func (h *HTTPRPCClient) postMethod(ctx context.Context, ip, method string) (io.R
if err != nil { if err != nil {
return nil, fmt.Errorf("request: %s", err) return nil, fmt.Errorf("request: %s", err)
} }
req = req.WithContext(ctx) req = req.WithContext(ctx)
req.Header.Set("Content-Type", "application/json")
resp, err := h.client.Do(req) resp, err := h.client.Do(req)
if err != nil { if err != nil {