This commit is contained in:
cdle 2021-08-20 10:04:34 +08:00
parent 9172e504fd
commit c137cfcba3

View File

@ -341,6 +341,11 @@ var handleMessage = func(msgs ...interface{}) interface{} {
if err != nil {
return nil
}
ctp := rsp.Header.Get("content-type")
if strings.Contains(ctp, "text") {
data, _ := ioutil.ReadAll(rsp.Body)
return string(data)
}
return rsp
}
return v