code: func (c *Client) DoReq(req *http.Request, v interface{}) error {
  	if c.Debug {
  		dump, err := httputil.DumpRequestOut(req, true)
  		if err != nil {
  			log.Println(err)
  		} else {
  			os.Stderr.Write(dump)
  			os.Stderr.Write([]byte{'\n', '\n'})
  		}
  	}
  
  	httpClient := c.HTTP
  	if httpClient == nil {
  		httpClient = http.DefaultClient
  	}
  
  	res, err := httpClient.Do(req)
  	if err != nil {
  		return err
  	}
  	defer res.Body.Close()
  	if c.Debug {
  		dump, err := httputil.DumpResponse(res, true)
  		if err != nil {
  			log.Println(err)
  		} else {
  			os.Stderr.Write(dump)
  			os.Stderr.Write([]byte{'\n'})
  		}
  	}
  	if err = CheckResp(res); err != nil {
  		return err
  	}
  	switch t := v.(type) {
  	case nil:
  	case io.Writer:
  		_, err = io.Copy(t, res.Body)
  	default:
  		err = json.NewDecoder(res.Body).Decode(v)
  	}
  	return err
  }
docs: // Submits an HTTP request, checks its response, and deserializes
  // the response into v. The type of v determines how to handle
  // the response body:
  //
  //   nil        body is discarded
  //   io.Writer  body is copied directly into v
  //   else       body is decoded into v as json
  //