code: func (c *client) ReadResponse() (*Response, error) {
  	version, code, msg, err := c.ReadStatusLine()
  	var headers []Header
  	if err != nil {
  		return nil, fmt.Errorf("ReadStatusLine: %v", err)
  	}
  	for {
  		var key, value string
  		var done bool
  		key, value, done, err = c.ReadHeader()
  		if err != nil || done {
  			break
  		}
  		if key == "" {
  			// empty header values are valid, rfc 2616 s4.2.
  			err = errors.New("invalid header")
  			break
  		}
  		headers = append(headers, Header{key, value})
  	}
  	var resp = Response{
  		Version: version,
  		Status:  Status{code, msg},
  		Headers: headers,
  		Body:    c.ReadBody(),
  	}
  	if l := resp.ContentLength(); l >= 0 {
  		resp.Body = io.LimitReader(resp.Body, l)
  	} else if resp.TransferEncoding() == "chunked" {
  		resp.Body = httputil.NewChunkedReader(resp.Body)
  	}
  	return &resp, err
  }
docs: // ReadResponse unmarshalls a HTTP response.