From 2b630f1de0ad838801cf41c3c2bd4d2099596847 Mon Sep 17 00:00:00 2001 From: Ivan Danyliuk Date: Wed, 20 Jun 2018 17:30:14 +0200 Subject: [PATCH] Fix content type for RPC requests --- rpc.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpc.go b/rpc.go index 8f4781f..8fa8d4e 100644 --- a/rpc.go +++ b/rpc.go @@ -79,7 +79,9 @@ func (h *HTTPRPCClient) postMethod(ctx context.Context, ip, method string) (io.R if err != nil { return nil, fmt.Errorf("request: %s", err) } + req = req.WithContext(ctx) + req.Header.Set("Content-Type", "application/json") resp, err := h.client.Do(req) if err != nil {