mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-16 01:50:25 +08:00
修复utils.DumpResponse()可能会忽略err的问题
This commit is contained in:
@@ -16,6 +16,9 @@ var timeoutClientLocker = sync.Mutex{}
|
||||
// DumpResponse 导出响应
|
||||
func DumpResponse(resp *http.Response) (header []byte, body []byte, err error) {
|
||||
header, err = httputil.DumpResponse(resp, false)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
body, err = ioutil.ReadAll(resp.Body)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user