From 6bf4914aded98163f968de0a64aacb45c2fbac1a Mon Sep 17 00:00:00 2001 From: Sinh Date: Fri, 13 Oct 2023 11:36:13 +0700 Subject: [PATCH] change body form data --- partnerapi/jtexpress/jtexpress.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/partnerapi/jtexpress/jtexpress.go b/partnerapi/jtexpress/jtexpress.go index 4ff00f2..34457c2 100644 --- a/partnerapi/jtexpress/jtexpress.go +++ b/partnerapi/jtexpress/jtexpress.go @@ -48,7 +48,7 @@ func (c *Client) EstimateFee(req *EstimateFeeReq) (r Response) { r.Request.Body = pjson.ToBytes(body) r.Request.URL = path resp, err := c.httpClient.R(). - SetFormData(body). + SetMultipartFormData(body). Post(path) if err != nil { r.Error = fmt.Errorf("jtepxress: request %s, err %v", path, err) @@ -72,7 +72,7 @@ func (c *Client) CancelOrder(req *CancelOrderReq) (r Response) { r.Request.Body = pjson.ToBytes(body) r.Request.URL = path resp, err := c.httpClient.R(). - SetFormData(body). + SetMultipartFormData(body). Post(path) if err != nil { r.Error = fmt.Errorf("jtepxress: request %s, err %v", path, err) @@ -98,7 +98,7 @@ func (c *Client) CreateOrder(req *CreateOrderReq) (r Response) { r.Request.URL = path resp, err := c.httpClient.R(). - SetFormData(body). + SetMultipartFormData(body). Post(path) if err != nil { r.Error = fmt.Errorf("jtepxress: request %s, err %v", path, err)