code: func (b *BigIP) APICall(options *APIRequest) ([]byte, error) {
  	var req *http.Request
  	client := &http.Client{
  		Transport: b.Transport,
  		Timeout:   b.ConfigOptions.APICallTimeout,
  	}
  	var format string
  	if strings.Contains(options.URL, "mgmt/") {
  		format = "%s/%s"
  	} else {
  		format = "%s/mgmt/tm/%s"
  	}
  	url := fmt.Sprintf(format, b.Host, options.URL)
  	body := bytes.NewReader([]byte(options.Body))
  	req, _ = http.NewRequest(strings.ToUpper(options.Method), url, body)
  	if b.Token != "" {
  		req.Header.Set("X-F5-Auth-Token", b.Token)
  	} else {
  		req.SetBasicAuth(b.User, b.Password)
  	}
  
  	// fmt.Println("REQ -- ", options.Method, " ", url, " -- ", options.Body)
  
  	if len(options.ContentType) > 0 {
  		req.Header.Set("Content-Type", options.ContentType)
  	}
  
  	res, err := client.Do(req)
  	if err != nil {
  		return nil, err
  	}
  
  	defer res.Body.Close()
  
  	data, _ := ioutil.ReadAll(res.Body)
  
  	if res.StatusCode >= 400 {
  		if res.Header.Get("Content-Type") == "application/json" {
  			return data, b.checkError(data)
  		}
  
  		return data, errors.New(fmt.Sprintf("HTTP %d :: %s", res.StatusCode, string(data[:])))
  	}
  
  	// fmt.Println("Resp --", res.StatusCode, " -- ", string(data))
  	return data, nil
  }
docs: // APICall is used to query the BIG-IP web API.