I have net/http handlers that have defer req.Body.Close() in each on web server side.
net/http
defer req.Body.Close()
What is the correct place to put this in? Should I pu
According to the Go documentation it is up to you to close the body once you are done with it.
I usually put the defer line right after the line where I check the request for errors.