diff --git a/api/client.go b/api/client.go index d038a3b..8404eee 100644 --- a/api/client.go +++ b/api/client.go @@ -1,6 +1,10 @@ package api -import "resty.dev/v3" +import ( + "crypto/tls" + + "resty.dev/v3" +) type Client struct { token string @@ -20,11 +24,17 @@ func NewClient(token string) *Client { } func NewDMClient(token, dmURL, device string) *Client { + restyClient := resty.New() + restyClient.SetTLSClientConfig(&tls.Config{ + MinVersion: tls.VersionTLS12, + MaxVersion: tls.VersionTLS12, + }) + return &Client{ token: token, device: device, - resty: resty.New(), + resty: restyClient, apiBaseURL: dmURL, - fiscalEndpoint: "/dm/execute", + fiscalEndpoint: "/dm/fiscal", } }