Read reads response (including body) from the given r. io.EOF is returned if r is closed before reading the first header byte.
(r *bufio.Reader)
| 1561 | // |
| 1562 | // io.EOF is returned if r is closed before reading the first header byte. |
| 1563 | func (resp *Response) Read(r *bufio.Reader) error { |
| 1564 | return resp.ReadLimitBody(r, 0) |
| 1565 | } |
| 1566 | |
| 1567 | // ReadLimitBody reads response headers from the given r, |
| 1568 | // then reads the body using the ReadBody function and limiting the body size. |