This commit is contained in:
cdle 2021-08-20 11:10:34 +08:00
parent 140b30d61e
commit a656883bde

View File

@ -344,7 +344,10 @@ var handleMessage = func(msgs ...interface{}) interface{} {
return nil return nil
} }
ctp := rsp.Header.Get("content-type") ctp := rsp.Header.Get("content-type")
if strings.Contains(ctp, "text") { if ctp == "" {
rsp.Header.Get("Content-Type")
}
if strings.Contains(ctp, "text") || strings.Contains(ctp, "json") {
data, _ := ioutil.ReadAll(rsp.Body) data, _ := ioutil.ReadAll(rsp.Body)
return string(data) return string(data)
} }