You forgot to close the http.Response body with defer response.Body.Close(). just insert defer response.Body.Close() on line 284.