Skip to content

Commit

Permalink
update view query
Browse files Browse the repository at this point in the history
  • Loading branch information
seiji0411 committed Aug 22, 2024
1 parent 9520fd6 commit a030a95
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions aptosclient/rest_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,8 @@ func (c *RestClient) RawQuery(urlWithoutVersion string, params map[string]string
return
}

func (c *RestClient) ViewQuery(payload map[string]string) (res []byte, err error) {
data, err := json.Marshal(payload)
if err != nil {
return
}
req, err := http.NewRequest("POST", c.GetVersionedRpcUrl()+"/view", bytes.NewReader(data))
func (c *RestClient) ViewQuery(payload string) (res []byte, err error) {
req, err := http.NewRequest("POST", c.GetVersionedRpcUrl()+"/view", bytes.NewReader([]byte(payload)))
if err != nil {
return
}
Expand Down

0 comments on commit a030a95

Please sign in to comment.