On Wednesday, July 5, 2017 at 6:50:10 AM UTC-4, Yulrizka wrote: > > > So in conclusion my question is do we need to always read the resp.Body > before closing it? > > Yes, you need to read the body to reuse the connection, otherwise there may be still be data waiting to be read.
You dug pretty deep here, but seemed to have skipped the documentation itself: // The default HTTP client's Transport does not // attempt to reuse HTTP/1.0 or HTTP/1.1 TCP connections // ("keep-alive") unless the Body is read to completion and is // closed. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.