update
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user