From a2610e6a9b6cc398c17ec47638bebf8028c3db97 Mon Sep 17 00:00:00 2001 From: qydysky Date: Mon, 5 Oct 2020 00:41:53 +0800 Subject: [PATCH] 83 --- Reqf.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- 2.39.2