The user might not want to read the body at all, so it might be best return an io.ReadCloser the same way net/http does. That io.ReadCloser would be responsible for handling reading content-length, chunked encoding, compression etc.
This would also be more familiar for users of net/http
The user might not want to read the body at all, so it might be best return an
io.ReadCloserthe same waynet/httpdoes. Thatio.ReadCloserwould be responsible for handling reading content-length, chunked encoding, compression etc.This would also be more familiar for users of
net/http