Skip to content

Commit

Permalink
update xhttp client
Browse files Browse the repository at this point in the history
  • Loading branch information
iGoogle-ink committed Nov 2, 2023
1 parent 2ed752e commit 750d9d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions alipay/common_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func systemOauthToken(ctx context.Context, appId string, privateKey *rsa.Private
if !isProd {
baseUrl = sandboxBaseUrlUtf8
}
_, bs, err = xhttp.NewClient().Req(xhttp.TypeForm).Post(baseUrl).SendString(bm.EncodeURLParams()).EndBytes(ctx)
_, bs, err = xhttp.NewClient().Req(xhttp.TypeFormData).Post(baseUrl).SendString(bm.EncodeURLParams()).EndBytes(ctx)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -218,7 +218,7 @@ func MonitorHeartbeatSyn(ctx context.Context, appId string, privateKey, signType
}
bm.Set("sign", sign)

_, bs, err = xhttp.NewClient().Req(xhttp.TypeForm).Post(baseUrlUtf8).SendString(bm.EncodeURLParams()).EndBytes(ctx)
_, bs, err = xhttp.NewClient().Req(xhttp.TypeFormData).Post(baseUrlUtf8).SendString(bm.EncodeURLParams()).EndBytes(ctx)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion alipay/customs.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (a *Client) doAliPayCustoms(ctx context.Context, bm gopay.BodyMap, service
xlog.Debugf("Alipay_Request: %s", bm.JsonBody())
}
// request
res, bs, err := a.hc.Req(xhttp.TypeForm).Post("https://mapi.alipay.com/gateway.do").SendString(bm.EncodeURLParams()).EndBytes(ctx)
res, bs, err := a.hc.Req(xhttp.TypeFormData).Post("https://mapi.alipay.com/gateway.do").SendString(bm.EncodeURLParams()).EndBytes(ctx)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 750d9d1

Please sign in to comment.