Similar interface as net/http.Client.Do() Most important note is that: Callers should close resp.Body when done reading from it. If resp.Body is not closed, the Client's underlying RoundTripper (typically Transport) may not be able to re-use a persistent TCP connection to the server for a subsequent "keep-alive" request.
c.Assert(err, IsNil) _, err = pool.Do(req) c.Assert(err, IsNil) finished <- true
c.Assert(err, IsNil) _, err = pool.Do(req) _, ok := err.(DialError) c.Assert(ok, IsTrue)