code: func (c *Client) newRequest(ctx context.Context, method, url string, body ...io.Reader) *http.Request {
  	var bodyR io.Reader
  	if len(body) > 0 {
  		bodyR = body[0]
  	}
  	if len(body) > 1 {
  		panic("too many body arguments")
  	}
  	req, err := http.NewRequest(method, url, bodyR)
  	if err != nil {
  		panic(err.Error())
  	}
  	// not done by http.NewRequest in Go 1.0:
  	if br, ok := bodyR.(*bytes.Reader); ok {
  		req.ContentLength = int64(br.Len())
  	}
  	c.authMode.AddAuthHeader(req)
  	return req.WithContext(ctx)
  }
docs: // newRequest creates a request with the authentication header, and with the
  // appropriate scheme and port in the case of self-signed TLS.