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 92fda81 commit f39c0fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion allinpay/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (c *Client) doPost(ctx context.Context, path string, bm gopay.BodyMap) (bs
if !c.isProd {
url = sandboxBaseUrl
}
res, bs, err := c.hc.Req(xhttp.TypeForm).Post(url + path).SendString(param).EndBytes(ctx)
res, bs, err := c.hc.Req(xhttp.TypeFormData).Post(url + path).SendString(param).EndBytes(ctx)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion paypal/access_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (c *Client) GetAccessToken() (token *AccessToken, err error) {
url = baseUrl + getAccessToken
// Authorization
authHeader := AuthorizationPrefixBasic + base64.StdEncoding.EncodeToString([]byte(c.Clientid+":"+c.Secret))
req := c.hc.Req(xhttp.TypeForm)
req := c.hc.Req(xhttp.TypeFormData)
req.Header.Add(HeaderAuthorization, authHeader)
req.Header.Add("Accept", "*/*")
// Body
Expand Down

0 comments on commit f39c0fb

Please sign in to comment.