Fix content type for RPC requests
This commit is contained in:
parent
87fa0cc5e5
commit
2b630f1de0
2
rpc.go
2
rpc.go
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue