diff --git a/client.go b/client.go index 9c4920185..d39252c1a 100644 --- a/client.go +++ b/client.go @@ -431,12 +431,18 @@ func (c *Client) updateHostURL() { ) } -// SetRootCertificate adds a root certificate to the underlying TLS client config +// SetRootCertificate adds a path to the root certificate to the underlying TLS client config. func (c *Client) SetRootCertificate(path string) *Client { c.resty.SetRootCertificate(path) return c } +// SetRootCertificateFromString adds a root certificate to the underlying TLS client config. +func (c *Client) SetRootCertificateFromString(ca string) *Client { + c.resty.SetRootCertificateFromString(ca) + return c +} + // SetToken sets the API token for all requests from this client // Only necessary if you haven't already provided the http client to NewClient() configured with the token. func (c *Client) SetToken(token string) *Client {