卡密,直充,回调 resp.StatusCode != 200

This commit is contained in:
李子铭 2024-11-18 13:36:02 +08:00
parent e0b1bf4b43
commit b3458b5052
1 changed files with 3 additions and 0 deletions

View File

@ -188,6 +188,9 @@ func (c *DctWServer) Request(_ context.Context, request DctWRequest, path string
fmt.Printf("resp.body:%s\n", string(bodyBytes))
fmt.Printf("resp.headers:%+v\n", resp.Header)
}
if resp.StatusCode != 200 {
return nil, fmt.Errorf("请求异常:%s", resp.Status)
}
return bodyBytes, nil
}