]> 127.0.0.1 Git - part/.git/commitdiff
83 v0.0.5
authorqydysky <qydysky@foxmail.com>
Sun, 4 Oct 2020 16:41:53 +0000 (00:41 +0800)
committerqydysky <qydysky@foxmail.com>
Sun, 4 Oct 2020 16:41:53 +0000 (00:41 +0800)
Reqf.go

diff --git a/Reqf.go b/Reqf.go
index 30382b10af4ccd3ca1ec4186343639565e4e5270..276072752f33e3cdb3ab029be6610909108d94ae 100644 (file)
--- 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
             }