优化代码

This commit is contained in:
刘祥超
2021-08-07 16:27:42 +08:00
parent 00df3fca84
commit 06db07ac4b
4 changed files with 37 additions and 10 deletions

View File

@@ -16,6 +16,9 @@ var timeoutClientLocker = sync.Mutex{}
// 导出响应
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
}