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 4, 2023
1 parent acdb38d commit 92fda81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions alipay/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (a *Client) doAliPaySelf(ctx context.Context, bm gopay.BodyMap, method stri
} else {
url = sandboxBaseUrlUtf8
}
res, bs, err := a.hc.Req(xhttp.TypeForm).Post(url).SendString(bm.EncodeURLParams()).EndBytes(ctx)
res, bs, err := a.hc.Req(xhttp.TypeFormData).Post(url).SendString(bm.EncodeURLParams()).EndBytes(ctx)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -116,7 +116,7 @@ func (a *Client) doAliPay(ctx context.Context, bm gopay.BodyMap, method string,
if !a.IsProd {
url = sandboxBaseUrlUtf8
}
res, bs, err := a.hc.Req(xhttp.TypeForm).Post(url).SendString(param).EndBytes(ctx)
res, bs, err := a.hc.Req(xhttp.TypeFormData).Post(url).SendString(param).EndBytes(ctx)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -172,7 +172,7 @@ func (a *Client) DoAliPay(ctx context.Context, bm gopay.BodyMap, method string,
if !a.IsProd {
url = sandboxBaseUrlUtf8
}
res, bs, err := a.hc.Req(xhttp.TypeForm).Post(url).SendString(param).EndBytes(ctx)
res, bs, err := a.hc.Req(xhttp.TypeFormData).Post(url).SendString(param).EndBytes(ctx)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 92fda81

Please sign in to comment.