diff --git a/aptosclient/rest_client.go b/aptosclient/rest_client.go index 997ee49..9c2e317 100644 --- a/aptosclient/rest_client.go +++ b/aptosclient/rest_client.go @@ -83,6 +83,7 @@ func (c *RestClient) RawQuery(urlWithoutVersion string, params map[string]string q.Add(k, v) } } + req.Header.Set("user-agent", "go-aptos-sdk") resp, err := c.c.Do(req) if err != nil { return @@ -119,6 +120,7 @@ func (c *RestClient) doReq(req *http.Request, result interface{}) error { } func doReqWithClient(req *http.Request, result interface{}, client *http.Client) error { + req.Header.Set("user-agent", "go-aptos-sdk") resp, err := client.Do(req) if err != nil { return err