Closed chennqqi closed 7 years ago
I think it should be defer resp.Close()
if no error occurred, no matter whether http.StatusCode is StatusOK.
@ginuerzh You're right. but call resp.Close()
must judge if http.Do
returned an error. I update defer resp.Close() before whether http.StatusCode is StatusOK.
a http post can be closed only if a
resp
is validThis hanppend when an fid not exist or removed already.