code: func (cl *Client) genericAPIRequest(c context.Context, base *url.URL, resource, action string, body, resp interface{}) error {
  	query, err := url.Parse(fmt.Sprintf("v1/%s:%s?alt=json", resource, action))
  	if err != nil {
  		return err
  	}
  	endpoint := base.ResolveReference(query)
  
  	// Serialize the body.
  	var reader io.Reader
  	if body != nil {
  		blob, err := json.Marshal(body)
  		if err != nil {
  			return err
  		}
  		reader = bytes.NewReader(blob)
  	}
  
  	// Issue the request
  	req, err := http.NewRequest("POST", endpoint.String(), reader)
  	if err != nil {
  		return err
  	}
  	if reader != nil {
  		req.Header.Set("Content-Type", "application/json")
  	}
  
  	// Send and handle errors. This is roughly how google-api-go-client calls
  	// methods. CheckResponse returns *googleapi.Error.
  	logging.Debugf(c, "POST %s", endpoint)
  	res, err := ctxhttp.Do(c, cl.Client, req)
  	if err != nil {
  		return err
  	}
  	defer googleapi.CloseBody(res)
  	if err := googleapi.CheckResponse(res); err != nil {
  		logging.WithError(err).Errorf(c, "POST %s failed", endpoint)
  		return err
  	}
  	return json.NewDecoder(res.Body).Decode(resp)
  }
docs: // genericAPIRequest performs HTTP POST to an IAM API endpoint.