code: func (c *Client) do(req *http.Request) (io.ReadCloser, int64, error) {
  	res, err := c.HTTPClient.Do(req)
  	if err != nil {
  		return nil, 0, err
  	}
  
  	if res.StatusCode < 400 {
  		return res.Body, res.ContentLength, err
  	}
  
  	defer res.Body.Close()
  
  	e := &Error{
  		Status:     http.StatusText(res.StatusCode),
  		StatusCode: res.StatusCode,
  	}
  
  	kind := res.Header.Get("Content-Type")
  
  	if strings.Contains(kind, "text/plain") {
  		if b, err := ioutil.ReadAll(res.Body); err == nil {
  			e.Summary = string(b)
  			return nil, 0, e
  		}
  		return nil, 0, err
  	}
  
  	if err := json.NewDecoder(res.Body).Decode(e); err != nil {
  		return nil, 0, err
  	}
  
  	return nil, 0, e
  }
docs: // perform the request.