pullzone_load_free_certificate.go raw

   1  package bunny
   2  
   3  import "context"
   4  
   5  type loadFreeCertificateQueryParams struct {
   6  	Hostname string `url:"hostname,omitempty"`
   7  }
   8  
   9  // LoadFreeCertificate represents the Load Free Certificate API Endpoint.
  10  //
  11  // Bunny.net API docs: https://docs.bunny.net/reference/pullzonepublic_loadfreecertificate
  12  func (s *PullZoneService) LoadFreeCertificate(ctx context.Context, hostname string) error {
  13  	params := loadFreeCertificateQueryParams{Hostname: hostname}
  14  
  15  	req, err := s.client.newGetRequest("/pullzone/loadFreeCertificate", &params)
  16  	if err != nil {
  17  		return err
  18  	}
  19  
  20  	return s.client.sendRequest(ctx, req, nil)
  21  }
  22