code: func (c *Client) Do(ctx context.Context, req *http.Request) (*http.Response, error) {
  	// TODO: setting the request ID should be done via client middleware. For now only set it if the
  	// caller provided one in the ctx.
  	if ctxreqid := ContextRequestID(ctx); ctxreqid != "" {
  		req.Header.Set("X-Request-Id", ctxreqid)
  	}
  	if c.UserAgent != "" {
  		req.Header.Set("User-Agent", c.UserAgent)
  	}
  	startedAt := time.Now()
  	ctx, id := ContextWithRequestID(ctx)
  	goa.LogInfo(ctx, "started", "id", id, req.Method, req.URL.String())
  	if c.Dump {
  		c.dumpRequest(ctx, req)
  	}
  	resp, err := c.Doer.Do(ctx, req)
  	if err != nil {
  		goa.LogError(ctx, "failed", "err", err)
  		return nil, err
  	}
  	goa.LogInfo(ctx, "completed", "id", id, "status", resp.StatusCode, "time", time.Since(startedAt).String())
  	if c.Dump {
  		c.dumpResponse(ctx, resp)
  	}
  	return resp, err
  }
docs: // Do wraps the underlying http client Do method and adds logging.
  // The logger should be in the context.