code: func (d *DNSProvider) sendRequest(method, resource string, payload interface{}, queryArgs map[string]string) (*http.Response, error) {
  	url := fmt.Sprintf("%s/Services/REST/v1/%s", d.config.BaseURL, resource)
  
  	body, err := json.Marshal(payload)
  	if err != nil {
  		return nil, fmt.Errorf("bluecat: %v", err)
  	}
  
  	req, err := http.NewRequest(method, url, bytes.NewReader(body))
  	if err != nil {
  		return nil, fmt.Errorf("bluecat: %v", err)
  	}
  	req.Header.Set("Content-Type", "application/json")
  	if len(d.token) > 0 {
  		req.Header.Set("Authorization", d.token)
  	}
  
  	// Add all query parameters
  	q := req.URL.Query()
  	for argName, argVal := range queryArgs {
  		q.Add(argName, argVal)
  	}
  	req.URL.RawQuery = q.Encode()
  	resp, err := d.config.HTTPClient.Do(req)
  	if err != nil {
  		return nil, fmt.Errorf("bluecat: %v", err)
  	}
  
  	if resp.StatusCode >= 400 {
  		errBytes, _ := ioutil.ReadAll(resp.Body)
  		errResp := string(errBytes)
  		return nil, fmt.Errorf("bluecat: request failed with HTTP status code %d\n Full message: %s",
  			resp.StatusCode, errResp)
  	}
  
  	return resp, nil
  }
docs: // Send a REST request, using query parameters specified. The Authorization
  // header will be set if we have an active auth token