This commit is contained in:
lychang
2026-05-21 01:57:25 +08:00
parent 7f5350db62
commit 10905c0acc
15 changed files with 7271 additions and 6387 deletions

View File

@@ -87,7 +87,8 @@ func (c *HTTPClient) Post(url string, data []byte, contentType string, headers m
}(resp.Body)
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return nil, fmt.Errorf("POST请求失败,状态码: %d", resp.StatusCode)
body, _ := io.ReadAll(resp.Body)
return nil, fmt.Errorf("POST请求失败,状态码: %d, 响应体: %s", resp.StatusCode, string(body))
}
body, err := io.ReadAll(resp.Body)