Scenario: Sending a client request and only reading the whole Response.Body for certain .StatusCode values, and/or reading only the first N bytes.
Docs for Client.Do() "If the Body is not both read to EOF and closed, the Client's underlying RoundTripper (typically Transport) may not be able to re-use a persistent TCP connection..." Docs for Client.Get/Post() "Caller should close resp.Body when done reading from it." Questions: - does the read-to-EOF stipulation also apply to Client.Get/Post() ? - why does Response.Body.Close() before io.EOF not release unread buffers or otherwise prepare it for persistence? -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/96d2e1d8-22e9-4cc0-99b2-b33721790773%40googlegroups.com.