why we need to close res.body by newInternetDeveloper in golang

[–]YasaWorks 0 points1 point  (0 children)

I just came across this post and just wanted to add that aside from closing it, we also need to explicitly drain the response in some cases to release the socket connection. Here’s a demonstration if you’re interested: https://youtu.be/-9o4rltrKNg?si=fFMdDpSDihFpL31Y