Skip to content

Commit

Permalink
feat: add header
Browse files Browse the repository at this point in the history
  • Loading branch information
xiang-xx committed Aug 20, 2024
1 parent c246823 commit 49d7fde
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aptosclient/rest_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 49d7fde

Please sign in to comment.