add headers before invoke

pull/2344/head
anirut 2 years ago
parent ee56ff4e27
commit fb46db740d
  1. 3
      transport/http/client.go

@ -221,6 +221,9 @@ func (client *Client) Invoke(ctx context.Context, method, path string, args inte
if err != nil { if err != nil {
return err return err
} }
for key, value := range c.headers {
req.Header.Set(key, value)
}
if contentType != "" { if contentType != "" {
req.Header.Set("Content-Type", c.contentType) req.Header.Set("Content-Type", c.contentType)
} }

Loading…
Cancel
Save