2025-04-22 21:18:16 +08:00

17 lines
409 B
Go

package bunnysdk
import (
"fmt"
"net/http"
"net/url"
)
func (c *Client) AddCustomCertificate(req *AddCustomCertificateRequest) ([]byte, error) {
if req.PullZoneId == "" {
return nil, fmt.Errorf("bunny api error: invalid parameter: PullZoneId")
}
resp, err := c.sendRequest(http.MethodPost, fmt.Sprintf("/pullzone/%s/addCertificate", url.PathEscape(req.PullZoneId)), req)
return resp.Body(), err
}