From: qydysky Date: Sun, 4 Oct 2020 16:41:53 +0000 (+0800) Subject: 83 X-Git-Tag: v0.0.5 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=a2610e6a9b6cc398c17ec47638bebf8028c3db97;p=part%2F.git 83 --- diff --git a/Reqf.go b/Reqf.go index 30382b1..2760727 100644 --- a/Reqf.go +++ b/Reqf.go @@ -170,7 +170,7 @@ func (this *req) Reqf_1(val Rval) (error) { this.ResponseCode = resp.StatusCode if !JustResponseCode { defer resp.Body.Close() - if SaveToPath != "" { + if SaveToPath != "" && resp.StatusCode == 200 { if err := saveToFile(resp.Body, SaveToPath); err != nil { return err }